home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-04-03 | 32.9 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: commands.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Wed Apr 3 18:30:12 1991, modified Wed Apr 3 18:30:12 1991, creator 'MPS ', type ASCII, 32268 bytes "commands.c" , at 0x7e8c 1098 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 63 6f 6d 6d 61 6e | 64 73 2e 63 00 00 00 00 |..comman|ds.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 7e 0c 00 | 00 04 4a a4 20 16 04 a4 |.....~..|..J. ...|
|00000060| 20 16 04 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6f 70 00 00 |........|....op..|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 23 0d 23 |--------|----.#.#|
|000000c0| 09 4e 65 77 73 57 61 74 | 63 68 65 72 09 2d 20 4d |.NewsWat|cher.- M|
|000000d0| 61 63 69 6e 74 6f 73 68 | 20 4e 4e 54 50 20 43 6c |acintosh| NNTP Cl|
|000000e0| 69 65 6e 74 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ient App|lication|
|000000f0| 0d 23 0d 23 09 57 72 69 | 74 74 65 6e 20 62 79 20 |.#.#.Wri|tten by |
|00000100| 53 74 65 76 65 6e 20 46 | 61 6c 6b 65 6e 62 75 72 |Steven F|alkenbur|
|00000110| 67 0d 23 09 a9 31 39 39 | 30 20 41 70 70 6c 65 20 |g.#..199|0 Apple |
|00000120| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 0d 23 |Computer|, Inc..#|
|00000130| 0d 23 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 23 0d |--------|-----.#.|
|00000170| 23 09 63 6f 6d 6d 61 6e | 64 73 2e 63 0d 23 0d 23 |#.comman|ds.c.#.#|
|00000180| 09 54 68 69 73 20 66 69 | 6c 65 20 63 6f 6e 74 61 |.This fi|le conta|
|00000190| 69 6e 73 20 75 73 65 72 | 20 69 6e 74 65 72 66 61 |ins user| interfa|
|000001a0| 63 65 20 72 6f 75 74 69 | 6e 65 73 20 77 68 69 63 |ce routi|nes whic|
|000001b0| 68 20 61 72 65 0d 23 09 | 63 61 6c 6c 65 64 20 69 |h are.#.|called i|
|000001c0| 6e 20 72 65 73 70 6f 6e | 73 65 20 74 6f 20 75 73 |n respon|se to us|
|000001d0| 65 72 20 61 63 74 69 6f | 6e 73 20 72 65 63 6f 72 |er actio|ns recor|
|000001e0| 64 65 64 20 69 6e 20 75 | 73 65 72 69 6e 74 2e 63 |ded in u|serint.c|
|000001f0| 0d 23 0d 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#.#----|--------|
|00000200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00000230| 2f 0d 0d 23 70 72 61 67 | 6d 61 20 73 65 67 6d 65 |/..#prag|ma segme|
|00000240| 6e 74 20 75 73 65 72 69 | 6e 74 0d 0d 23 69 6e 63 |nt useri|nt..#inc|
|00000250| 6c 75 64 65 20 22 63 6f | 6d 70 61 74 2e 68 22 0d |lude "co|mpat.h".|
|00000260| 23 69 6e 63 6c 75 64 65 | 20 3c 43 54 79 70 65 2e |#include| <CType.|
|00000270| 68 3e 0d 0d 23 69 66 64 | 65 66 20 50 52 4f 54 4f |h>..#ifd|ef PROTO|
|00000280| 53 0d 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 79 70 |S..#incl|ude <Typ|
|00000290| 65 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |es.h>.#i|nclude <|
|000002a0| 51 75 69 63 6b 44 72 61 | 77 2e 68 3e 0d 23 69 6e |QuickDra|w.h>.#in|
|000002b0| 63 6c 75 64 65 20 3c 46 | 6f 6e 74 73 2e 68 3e 0d |clude <F|onts.h>.|
|000002c0| 23 69 6e 63 6c 75 64 65 | 20 3c 57 69 6e 64 6f 77 |#include| <Window|
|000002d0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 4d |s.h>.#in|clude <M|
|000002e0| 65 6e 75 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |enus.h>.|#include|
|000002f0| 20 3c 54 65 78 74 45 64 | 69 74 2e 68 3e 0d 23 69 | <TextEd|it.h>.#i|
|00000300| 6e 63 6c 75 64 65 20 3c | 44 69 61 6c 6f 67 73 2e |nclude <|Dialogs.|
|00000310| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 4f 53 55 |h>.#incl|ude <OSU|
|00000320| 74 69 6c 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |tils.h>.|#include|
|00000330| 20 3c 44 65 73 6b 2e 68 | 3e 0d 23 69 6e 63 6c 75 | <Desk.h|>.#inclu|
|00000340| 64 65 20 3c 54 6f 6f 6c | 55 74 69 6c 73 2e 68 3e |de <Tool|Utils.h>|
|00000350| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 4f 53 45 76 65 |.#includ|e <OSEve|
|00000360| 6e 74 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |nts.h>.#|include |
|00000370| 3c 4c 69 73 74 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Lists.h|>.#inclu|
|00000380| 64 65 20 3c 43 75 72 73 | 6f 72 43 74 6c 2e 68 3e |de <Curs|orCtl.h>|
|00000390| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 50 61 63 6b 61 |.#includ|e <Packa|
|000003a0| 67 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ges.h>.#|include |
|000003b0| 3c 53 63 72 61 70 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Scrap.h|>.#inclu|
|000003c0| 64 65 20 3c 52 65 73 6f | 75 72 63 65 73 2e 68 3e |de <Reso|urces.h>|
|000003d0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 53 63 72 69 70 |.#includ|e <Scrip|
|000003e0| 74 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 50 |t.h>.#in|clude <P|
|000003f0| 72 69 6e 74 69 6e 67 2e | 68 3e 0d 23 69 6e 63 6c |rinting.|h>.#incl|
|00000400| 75 64 65 20 3c 53 74 72 | 69 6e 67 73 2e 68 3e 0d |ude <Str|ings.h>.|
|00000410| 23 65 6e 64 69 66 0d 0d | 23 69 6e 63 6c 75 64 65 |#endif..|#include|
|00000420| 20 3c 53 74 64 4c 69 62 | 2e 68 3e 0d 23 69 6e 63 | <StdLib|.h>.#inc|
|00000430| 6c 75 64 65 20 3c 53 74 | 72 69 6e 67 2e 68 3e 0d |lude <St|ring.h>.|
|00000440| 0d 23 69 6e 63 6c 75 64 | 65 20 22 6e 6e 74 70 2e |.#includ|e "nntp.|
|00000450| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 75 73 65 |h".#incl|ude "use|
|00000460| 72 69 6e 74 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |rint.h".|#include|
|00000470| 20 22 6e 65 77 73 70 72 | 6f 63 65 73 73 2e 68 22 | "newspr|ocess.h"|
|00000480| 0d 23 69 6e 63 6c 75 64 | 65 20 22 53 63 72 6f 6c |.#includ|e "Scrol|
|00000490| 6c 53 74 75 66 66 2e 68 | 22 0d 23 69 6e 63 6c 75 |lStuff.h|".#inclu|
|000004a0| 64 65 20 22 6e 65 74 73 | 74 75 66 66 2e 68 22 0d |de "nets|tuff.h".|
|000004b0| 23 69 6e 63 6c 75 64 65 | 20 22 6d 69 73 63 73 74 |#include| "miscst|
|000004c0| 75 66 66 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |uff.h".#|include |
|000004d0| 22 70 72 69 6e 74 73 74 | 75 66 66 2e 68 22 0d 23 |"printst|uff.h".#|
|000004e0| 69 6e 63 6c 75 64 65 20 | 22 63 6f 6d 6d 61 6e 64 |include |"command|
|000004f0| 73 2e 68 22 0d 0d 23 69 | 66 64 65 66 20 4e 4e 54 |s.h"..#i|fdef NNT|
|00000500| 50 4e 45 57 53 0d 23 69 | 6e 63 6c 75 64 65 20 22 |PNEWS.#i|nclude "|
|00000510| 4e 4e 54 50 4c 6f 77 2e | 68 22 0d 23 65 6c 73 65 |NNTPLow.|h".#else|
|00000520| 0d 23 69 6e 63 6c 75 64 | 65 20 22 48 46 53 4e 54 |.#includ|e "HFSNT|
|00000530| 50 4c 6f 77 2e 68 22 0d | 23 65 6e 64 69 66 0d 0d |PLow.h".|#endif..|
|00000540| 0d 2f 2a 09 61 64 64 73 | 20 61 20 63 68 69 6c 64 |./*.adds| a child|
|00000550| 20 77 69 6e 64 6f 77 20 | 74 6f 20 74 68 65 20 77 | window |to the w|
|00000560| 69 6e 64 6f 77 6c 69 73 | 74 20 6f 66 20 61 20 70 |indowlis|t of a p|
|00000570| 61 72 65 6e 74 0d 09 57 | 69 6e 64 6f 77 73 20 77 |arent..W|indows w|
|00000580| 69 74 68 20 61 73 73 6f | 63 69 61 74 65 64 20 63 |ith asso|ciated c|
|00000590| 68 69 6c 64 20 77 69 6e | 64 6f 77 73 20 77 69 6c |hild win|dows wil|
|000005a0| 6c 20 63 6c 6f 73 65 0d | 09 74 68 65 69 72 20 63 |l close.|.their c|
|000005b0| 68 69 6c 64 72 65 6e 20 | 77 68 65 6e 20 63 6c 6f |hildren |when clo|
|000005c0| 73 65 64 0d 2a 2f 0d 0d | 76 6f 69 64 20 41 64 64 |sed.*/..|void Add|
|000005d0| 43 68 69 6c 64 28 57 69 | 6e 64 6f 77 50 74 72 20 |Child(Wi|ndowPtr |
|000005e0| 70 61 72 65 6e 74 2c 57 | 69 6e 64 6f 77 50 74 72 |parent,W|indowPtr|
|000005f0| 20 63 68 69 6c 64 29 0d | 7b 0d 09 54 77 69 6e 64 | child).|{..Twind|
|00000600| 6f 77 49 6e 66 6f 20 2a | 70 61 72 65 6e 74 49 6e |owInfo *|parentIn|
|00000610| 66 6f 3b 0d 09 54 57 4c | 69 73 74 20 2a 6e 65 77 |fo;..TWL|ist *new|
|00000620| 43 68 69 6c 64 3b 0d 09 | 0d 09 70 61 72 65 6e 74 |Child;..|..parent|
|00000630| 49 6e 66 6f 20 3d 20 28 | 54 77 69 6e 64 6f 77 49 |Info = (|TwindowI|
|00000640| 6e 66 6f 20 2a 29 20 47 | 65 74 57 52 65 66 43 6f |nfo *) G|etWRefCo|
|00000650| 6e 28 70 61 72 65 6e 74 | 29 3b 0d 09 0d 09 6e 65 |n(parent|);....ne|
|00000660| 77 43 68 69 6c 64 20 3d | 20 28 54 57 4c 69 73 74 |wChild =| (TWList|
|00000670| 20 2a 29 20 4d 79 4e 65 | 77 50 74 72 28 73 69 7a | *) MyNe|wPtr(siz|
|00000680| 65 6f 66 28 54 57 4c 69 | 73 74 29 29 3b 0d 09 69 |eof(TWLi|st));..i|
|00000690| 66 20 28 4d 79 4d 65 6d | 45 72 72 28 29 20 21 3d |f (MyMem|Err() !=|
|000006a0| 20 6e 6f 45 72 72 29 0d | 09 09 72 65 74 75 72 6e | noErr).|..return|
|000006b0| 3b 0d 09 6e 65 77 43 68 | 69 6c 64 2d 3e 63 68 69 |;..newCh|ild->chi|
|000006c0| 6c 64 57 69 6e 64 6f 77 | 20 3d 20 63 68 69 6c 64 |ldWindow| = child|
|000006d0| 3b 0d 09 6e 65 77 43 68 | 69 6c 64 2d 3e 6e 65 78 |;..newCh|ild->nex|
|000006e0| 74 20 3d 20 70 61 72 65 | 6e 74 49 6e 66 6f 2d 3e |t = pare|ntInfo->|
|000006f0| 63 68 69 6c 64 4c 69 73 | 74 3b 0d 09 70 61 72 65 |childLis|t;..pare|
|00000700| 6e 74 49 6e 66 6f 2d 3e | 63 68 69 6c 64 4c 69 73 |ntInfo->|childLis|
|00000710| 74 20 3d 20 6e 65 77 43 | 68 69 6c 64 3b 0d 7d 0d |t = newC|hild;.}.|
|00000720| 0d 0d 2f 2a 20 52 65 6d | 6f 76 65 73 20 61 20 63 |../* Rem|oves a c|
|00000730| 68 69 6c 64 20 77 69 6e | 64 6f 77 20 66 72 6f 6d |hild win|dow from|
|00000740| 20 74 68 65 20 77 69 6e | 64 6f 77 6c 69 73 74 20 | the win|dowlist |
|00000750| 6f 66 20 61 20 70 61 72 | 65 6e 74 0d 2a 2f 0d 0d |of a par|ent.*/..|
|00000760| 76 6f 69 64 20 52 65 6d | 6f 76 65 43 68 69 6c 64 |void Rem|oveChild|
|00000770| 28 57 69 6e 64 6f 77 50 | 74 72 20 70 61 72 65 6e |(WindowP|tr paren|
|00000780| 74 2c 57 69 6e 64 6f 77 | 50 74 72 20 63 68 69 6c |t,Window|Ptr chil|
|00000790| 64 29 0d 7b 0d 09 54 77 | 69 6e 64 6f 77 49 6e 66 |d).{..Tw|indowInf|
|000007a0| 6f 20 2a 70 61 72 65 6e | 74 49 6e 66 6f 3b 0d 09 |o *paren|tInfo;..|
|000007b0| 54 57 4c 69 73 74 20 2a | 63 75 72 72 65 6e 74 2c |TWList *|current,|
|000007c0| 2a 70 72 65 76 3b 0d 09 | 0d 09 70 61 72 65 6e 74 |*prev;..|..parent|
|000007d0| 49 6e 66 6f 20 3d 20 28 | 54 77 69 6e 64 6f 77 49 |Info = (|TwindowI|
|000007e0| 6e 66 6f 20 2a 29 20 47 | 65 74 57 52 65 66 43 6f |nfo *) G|etWRefCo|
|000007f0| 6e 28 70 61 72 65 6e 74 | 29 3b 0d 09 66 6f 72 20 |n(parent|);..for |
|00000800| 28 63 75 72 72 65 6e 74 | 20 3d 20 70 72 65 76 20 |(current| = prev |
|00000810| 3d 20 70 61 72 65 6e 74 | 49 6e 66 6f 2d 3e 63 68 |= parent|Info->ch|
|00000820| 69 6c 64 4c 69 73 74 3b | 0d 09 09 63 75 72 72 65 |ildList;|...curre|
|00000830| 6e 74 20 21 3d 20 6e 69 | 6c 20 26 26 20 63 75 72 |nt != ni|l && cur|
|00000840| 72 65 6e 74 2d 3e 63 68 | 69 6c 64 57 69 6e 64 6f |rent->ch|ildWindo|
|00000850| 77 21 3d 63 68 69 6c 64 | 3b 0d 09 09 70 72 65 76 |w!=child|;...prev|
|00000860| 20 3d 20 63 75 72 72 65 | 6e 74 2c 63 75 72 72 65 | = curre|nt,curre|
|00000870| 6e 74 20 3d 20 63 75 72 | 72 65 6e 74 2d 3e 6e 65 |nt = cur|rent->ne|
|00000880| 78 74 29 0d 09 09 3b 0d | 09 69 66 20 28 63 75 72 |xt)...;.|.if (cur|
|00000890| 72 65 6e 74 29 20 7b 0d | 09 09 70 72 65 76 2d 3e |rent) {.|..prev->|
|000008a0| 6e 65 78 74 20 3d 20 63 | 75 72 72 65 6e 74 2d 3e |next = c|urrent->|
|000008b0| 6e 65 78 74 3b 0d 09 09 | 69 66 20 28 70 72 65 76 |next;...|if (prev|
|000008c0| 20 3d 3d 20 63 75 72 72 | 65 6e 74 29 0d 09 09 09 | == curr|ent)....|
|000008d0| 70 61 72 65 6e 74 49 6e | 66 6f 2d 3e 63 68 69 6c |parentIn|fo->chil|
|000008e0| 64 4c 69 73 74 20 3d 20 | 63 75 72 72 65 6e 74 2d |dList = |current-|
|000008f0| 3e 6e 65 78 74 3b 0d 09 | 09 4d 79 44 69 73 70 6f |>next;..|.MyDispo|
|00000900| 73 50 74 72 28 28 50 74 | 72 29 63 75 72 72 65 6e |sPtr((Pt|r)curren|
|00000910| 74 29 3b 0d 09 7d 0d 7d | 0d 0d 0d 2f 2a 09 4d 61 |t);..}.}|.../*.Ma|
|00000920| 6b 65 47 72 6f 75 70 4c | 69 73 74 20 74 61 6b 65 |keGroupL|ist take|
|00000930| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 67 72 6f 75 |s a list| of grou|
|00000940| 70 73 20 61 6e 64 20 61 | 20 4c 69 73 74 20 4d 61 |ps and a| List Ma|
|00000950| 6e 61 67 65 72 0d 09 68 | 61 6e 64 6c 65 2e 20 20 |nager..h|andle. |
|00000960| 54 68 65 20 67 72 6f 75 | 70 73 20 61 72 65 20 73 |The grou|ps are s|
|00000970| 6f 72 74 65 64 20 61 6e | 64 20 61 64 64 65 64 20 |orted an|d added |
|00000980| 74 6f 20 74 68 65 20 6c | 69 73 74 2e 0d 2a 2f 0d |to the l|ist..*/.|
|00000990| 0d 76 6f 69 64 20 4d 61 | 6b 65 47 72 6f 75 70 4c |.void Ma|keGroupL|
|000009a0| 69 73 74 28 4c 69 73 74 | 48 61 6e 64 6c 65 20 74 |ist(List|Handle t|
|000009b0| 68 65 4c 69 73 74 2c 73 | 68 6f 72 74 20 6e 75 6d |heList,s|hort num|
|000009c0| 47 72 6f 75 70 73 2c 54 | 47 72 6f 75 70 20 2a 67 |Groups,T|Group *g|
|000009d0| 72 6f 75 70 4c 69 73 74 | 29 0d 7b 0d 09 6c 6f 6e |roupList|).{..lon|
|000009e0| 67 20 69 3b 0d 09 43 65 | 6c 6c 20 74 68 65 43 65 |g i;..Ce|ll theCe|
|000009f0| 6c 6c 3b 0d 09 63 68 61 | 72 20 74 68 65 4e 61 6d |ll;..cha|r theNam|
|00000a00| 65 5b 32 35 36 5d 3b 0d | 09 73 68 6f 72 74 20 63 |e[256];.|.short c|
|00000a10| 65 6c 6c 4c 65 6e 3b 0d | 09 0d 09 53 74 61 74 75 |ellLen;.|...Statu|
|00000a20| 73 57 69 6e 64 6f 77 28 | 22 53 6f 72 74 69 6e 67 |sWindow(|"Sorting|
|00000a30| 20 47 72 6f 75 70 73 2e | 2e 2e 22 2c 2d 31 29 3b | Groups.|..",-1);|
|00000a40| 0d 09 71 73 6f 72 74 28 | 67 72 6f 75 70 4c 69 73 |..qsort(|groupLis|
|00000a50| 74 2c 20 6e 75 6d 47 72 | 6f 75 70 73 2c 20 73 69 |t, numGr|oups, si|
|00000a60| 7a 65 6f 66 28 54 47 72 | 6f 75 70 29 2c 20 4d 79 |zeof(TGr|oup), My|
|00000a70| 43 6f 6d 70 61 72 65 29 | 3b 0d 09 0d 09 53 74 61 |Compare)|;....Sta|
|00000a80| 74 75 73 57 69 6e 64 6f | 77 28 22 42 75 69 6c 64 |tusWindo|w("Build|
|00000a90| 69 6e 67 20 4c 69 73 74 | 2e 2e 2e 22 2c 30 29 3b |ing List|...",0);|
|00000aa0| 0d 09 47 69 76 65 54 69 | 6d 65 28 30 29 3b 0d 09 |..GiveTi|me(0);..|
|00000ab0| 0d 09 4c 44 6f 44 72 61 | 77 28 66 61 6c 73 65 2c |..LDoDra|w(false,|
|00000ac0| 74 68 65 4c 69 73 74 29 | 3b 0d 09 4c 41 64 64 52 |theList)|;..LAddR|
|00000ad0| 6f 77 28 6e 75 6d 47 72 | 6f 75 70 73 2c 30 2c 74 |ow(numGr|oups,0,t|
|00000ae0| 68 65 4c 69 73 74 29 3b | 0d 09 66 6f 72 20 28 69 |heList);|..for (i|
|00000af0| 3d 30 3b 20 69 3c 6e 75 | 6d 47 72 6f 75 70 73 3b |=0; i<nu|mGroups;|
|00000b00| 20 69 2b 2b 29 20 7b 0d | 0d 09 09 73 74 72 63 70 | i++) {.|...strcp|
|00000b10| 79 28 74 68 65 4e 61 6d | 65 2c 67 72 6f 75 70 4c |y(theNam|e,groupL|
|00000b20| 69 73 74 5b 69 5d 2e 6e | 61 6d 65 29 3b 0d 09 09 |ist[i].n|ame);...|
|00000b30| 69 66 20 28 28 67 72 6f | 75 70 4c 69 73 74 5b 69 |if ((gro|upList[i|
|00000b40| 5d 2e 6c 61 73 74 4d 65 | 73 73 20 2d 20 67 72 6f |].lastMe|ss - gro|
|00000b50| 75 70 4c 69 73 74 5b 69 | 5d 2e 66 69 72 73 74 4d |upList[i|].firstM|
|00000b60| 65 73 73 29 20 3c 3d 20 | 30 29 20 7b 0d 09 09 09 |ess) <= |0) {....|
|00000b70| 63 65 6c 6c 4c 65 6e 20 | 3d 20 73 74 72 6c 65 6e |cellLen |= strlen|
|00000b80| 28 74 68 65 4e 61 6d 65 | 29 2b 32 3b 0d 09 09 09 |(theName|)+2;....|
|00000b90| 74 68 65 4e 61 6d 65 5b | 63 65 6c 6c 4c 65 6e 2d |theName[|cellLen-|
|00000ba0| 31 5d 20 3d 20 30 78 66 | 66 3b 0d 09 09 7d 0d 09 |1] = 0xf|f;...}..|
|00000bb0| 09 65 6c 73 65 0d 09 09 | 09 63 65 6c 6c 4c 65 6e |.else...|.cellLen|
|00000bc0| 20 3d 20 73 74 72 6c 65 | 6e 28 74 68 65 4e 61 6d | = strle|n(theNam|
|00000bd0| 65 29 2b 31 3b 0d 0d 09 | 09 53 65 74 50 74 28 26 |e)+1;...|.SetPt(&|
|00000be0| 74 68 65 43 65 6c 6c 2c | 30 2c 69 29 3b 0d 09 09 |theCell,|0,i);...|
|00000bf0| 4c 53 65 74 43 65 6c 6c | 28 74 68 65 4e 61 6d 65 |LSetCell|(theName|
|00000c00| 2c 63 65 6c 6c 4c 65 6e | 2c 74 68 65 43 65 6c 6c |,cellLen|,theCell|
|00000c10| 2c 74 68 65 4c 69 73 74 | 29 3b 0d 09 09 53 74 61 |,theList|);...Sta|
|00000c20| 74 75 73 57 69 6e 64 6f | 77 28 22 42 75 69 6c 64 |tusWindo|w("Build|
|00000c30| 69 6e 67 20 4c 69 73 74 | 2e 2e 2e 22 2c 28 73 68 |ing List|...",(sh|
|00000c40| 6f 72 74 29 28 28 28 66 | 6c 6f 61 74 29 28 69 2b |ort)(((f|loat)(i+|
|00000c50| 31 29 2f 28 66 6c 6f 61 | 74 29 6e 75 6d 47 72 6f |1)/(floa|t)numGro|
|00000c60| 75 70 73 29 2a 31 30 30 | 29 2b 31 29 3b 0d 09 09 |ups)*100|)+1);...|
|00000c70| 47 69 76 65 54 69 6d 65 | 28 30 29 3b 0d 09 7d 0d |GiveTime|(0);..}.|
|00000c80| 09 53 74 61 74 75 73 57 | 69 6e 64 6f 77 28 22 42 |.StatusW|indow("B|
|00000c90| 75 69 6c 64 69 6e 67 20 | 4c 69 73 74 2e 2e 2e 22 |uilding |List..."|
|00000ca0| 2c 31 30 30 29 3b 0d 09 | 47 69 76 65 54 69 6d 65 |,100);..|GiveTime|
|00000cb0| 28 30 29 3b 0d 09 4c 44 | 6f 44 72 61 77 28 74 72 |(0);..LD|oDraw(tr|
|00000cc0| 75 65 2c 74 68 65 4c 69 | 73 74 29 3b 0d 09 53 65 |ue,theLi|st);..Se|
|00000cd0| 74 43 75 72 73 6f 72 28 | 26 51 44 41 52 52 4f 57 |tCursor(|&QDARROW|
|00000ce0| 29 3b 0d 7d 0d 0d 0d 2f | 2a 09 4d 79 43 6f 6d 70 |);.}.../|*.MyComp|
|00000cf0| 61 72 65 20 69 73 20 61 | 20 63 6f 6d 70 61 72 69 |are is a| compari|
|00000d00| 73 6f 6e 20 72 6f 75 74 | 69 6e 65 20 75 73 65 64 |son rout|ine used|
|00000d10| 20 69 6e 20 74 68 65 20 | 63 61 6c 6c 20 74 6f 0d | in the |call to.|
|00000d20| 09 71 73 6f 72 74 28 29 | 20 61 62 6f 76 65 2e 20 |.qsort()| above. |
|00000d30| 20 49 74 20 64 6f 65 73 | 20 61 20 73 69 6d 70 6c | It does| a simpl|
|00000d40| 65 20 73 74 72 69 6e 67 | 20 63 6f 6d 70 61 72 65 |e string| compare|
|00000d50| 2c 20 61 6e 64 0d 09 67 | 69 76 65 73 20 74 69 6d |, and..g|ives tim|
|00000d60| 65 20 74 6f 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |e to bac|kground |
|00000d70| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2e 0d 2a 2f |applicat|ions..*/|
|00000d80| 0d 0d 69 6e 74 20 4d 79 | 43 6f 6d 70 61 72 65 28 |..int My|Compare(|
|00000d90| 54 47 72 6f 75 70 20 2a | 6f 6e 65 2c 54 47 72 6f |TGroup *|one,TGro|
|00000da0| 75 70 20 2a 74 77 6f 29 | 0d 7b 0d 09 47 69 76 65 |up *two)|.{..Give|
|00000db0| 54 69 6d 65 28 30 29 3b | 0d 09 72 65 74 75 72 6e |Time(0);|..return|
|00000dc0| 20 73 74 72 63 6d 70 28 | 6f 6e 65 2d 3e 6e 61 6d | strcmp(|one->nam|
|00000dd0| 65 2c 74 77 6f 2d 3e 6e | 61 6d 65 29 3b 0d 7d 0d |e,two->n|ame);.}.|
|00000de0| 0d 0d 2f 2a 09 48 61 6e | 64 6c 65 47 72 6f 75 70 |../*.Han|dleGroup|
|00000df0| 53 65 6c 65 63 74 20 69 | 73 20 63 61 6c 6c 65 64 |Select i|s called|
|00000e00| 20 69 6e 20 72 65 73 70 | 6f 6e 73 65 20 74 6f 20 | in resp|onse to |
|00000e10| 61 20 6d 6f 75 73 65 0d | 09 64 6f 77 6e 20 65 76 |a mouse.|.down ev|
|00000e20| 65 6e 74 20 69 6e 20 61 | 20 6d 61 69 6e 20 67 72 |ent in a| main gr|
|00000e30| 6f 75 70 20 77 69 6e 64 | 6f 77 20 28 6e 6f 74 20 |oup wind|ow (not |
|00000e40| 61 20 75 73 65 72 20 67 | 72 6f 75 70 0d 09 77 69 |a user g|roup..wi|
|00000e50| 6e 64 6f 77 29 2e 20 20 | 49 74 20 6f 70 65 6e 73 |ndow). |It opens|
|00000e60| 20 61 20 73 75 62 6a 65 | 63 74 20 77 69 6e 64 6f | a subje|ct windo|
|00000e70| 77 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 68 65 |w contai|ning the|
|00000e80| 0d 09 6e 61 6d 65 73 20 | 6f 66 20 61 6c 6c 20 61 |..names |of all a|
|00000e90| 72 74 69 63 6c 65 73 20 | 69 6e 20 74 68 61 74 20 |rticles |in that |
|00000ea0| 67 72 6f 75 70 2e 0d 2a | 2f 0d 0d 76 6f 69 64 20 |group..*|/..void |
|00000eb0| 48 61 6e 64 6c 65 47 72 | 6f 75 70 53 65 6c 65 63 |HandleGr|oupSelec|
|00000ec0| 74 28 43 65 6c 6c 20 74 | 68 65 43 65 6c 6c 2c 57 |t(Cell t|heCell,W|
|00000ed0| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 29 |indowPtr| window)|
|00000ee0| 0d 7b 0d 09 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 |.{..Twin|dowInfo |
|00000ef0| 2a 74 68 65 49 6e 66 6f | 3b 0d 09 57 69 6e 64 6f |*theInfo|;..Windo|
|00000f00| 77 50 74 72 20 74 68 65 | 57 69 6e 64 3b 0d 09 53 |wPtr the|Wind;..S|
|00000f10| 74 72 32 35 35 20 74 6d | 70 53 74 72 2c 74 6d 70 |tr255 tm|pStr,tmp|
|00000f20| 54 69 74 6c 65 3b 0d 09 | 54 47 72 6f 75 70 20 2a |Title;..|TGroup *|
|00000f30| 67 72 6f 75 70 4c 69 73 | 74 2c 2a 74 68 65 47 72 |groupLis|t,*theGr|
|00000f40| 6f 75 70 3b 0d 09 47 72 | 61 66 50 74 72 20 73 61 |oup;..Gr|afPtr sa|
|00000f50| 76 65 50 6f 72 74 3b 0d | 09 43 65 6c 6c 20 74 68 |vePort;.|.Cell th|
|00000f60| 65 50 74 3b 0d 09 50 6f | 69 6e 74 20 66 69 72 73 |ePt;..Po|int firs|
|00000f70| 74 4f 66 66 73 65 74 3b | 0d 09 57 69 6e 64 6f 77 |tOffset;|..Window|
|00000f80| 50 74 72 20 74 6d 70 57 | 69 6e 64 6f 77 3b 0d 09 |Ptr tmpW|indow;..|
|00000f90| 63 68 61 72 20 67 72 6f | 75 70 53 74 72 5b 32 35 |char gro|upStr[25|
|00000fa0| 36 5d 3b 0d 09 73 68 6f | 72 74 20 67 72 6f 75 70 |6];..sho|rt group|
|00000fb0| 4c 65 6e 3b 0d 09 0d 09 | 65 78 74 65 72 6e 20 54 |Len;....|extern T|
|00000fc0| 50 72 65 66 52 65 63 20 | 67 50 72 65 66 73 3b 0d |PrefRec |gPrefs;.|
|00000fd0| 09 0d 09 53 65 74 50 74 | 28 26 66 69 72 73 74 4f |...SetPt|(&firstO|
|00000fe0| 66 66 73 65 74 2c 30 2c | 30 29 3b 0d 09 47 65 74 |ffset,0,|0);..Get|
|00000ff0| 50 6f 72 74 28 26 73 61 | 76 65 50 6f 72 74 29 3b |Port(&sa|vePort);|
|00001000| 0d 09 53 65 74 50 6f 72 | 74 28 77 69 6e 64 6f 77 |..SetPor|t(window|
|00001010| 29 3b 0d 09 4c 6f 63 61 | 6c 54 6f 47 6c 6f 62 61 |);..Loca|lToGloba|
|00001020| 6c 28 26 66 69 72 73 74 | 4f 66 66 73 65 74 29 3b |l(&first|Offset);|
|00001030| 0d 09 53 65 74 50 6f 72 | 74 28 73 61 76 65 50 6f |..SetPor|t(savePo|
|00001040| 72 74 29 3b 0d 0d 09 74 | 68 65 49 6e 66 6f 20 3d |rt);...t|heInfo =|
|00001050| 20 28 54 77 69 6e 64 6f | 77 49 6e 66 6f 20 2a 29 | (Twindo|wInfo *)|
|00001060| 20 47 65 74 57 52 65 66 | 43 6f 6e 28 77 69 6e 64 | GetWRef|Con(wind|
|00001070| 6f 77 29 3b 0d 09 67 72 | 6f 75 70 4c 69 73 74 20 |ow);..gr|oupList |
|00001080| 3d 20 28 54 47 72 6f 75 | 70 20 2a 29 20 74 68 65 |= (TGrou|p *) the|
|00001090| 49 6e 66 6f 2d 3e 64 61 | 74 61 32 3b 0d 09 0d 09 |Info->da|ta2;....|
|000010a0| 67 72 6f 75 70 4c 65 6e | 20 3d 20 32 35 36 3b 0d |groupLen| = 256;.|
|000010b0| 09 4c 47 65 74 43 65 6c | 6c 28 67 72 6f 75 70 53 |.LGetCel|l(groupS|
|000010c0| 74 72 2c 26 67 72 6f 75 | 70 4c 65 6e 2c 74 68 65 |tr,&grou|pLen,the|
|000010d0| 43 65 6c 6c 2c 28 4c 69 | 73 74 48 61 6e 64 6c 65 |Cell,(Li|stHandle|
|000010e0| 29 74 68 65 49 6e 66 6f | 2d 3e 64 61 74 61 29 3b |)theInfo|->data);|
|000010f0| 0d 09 0d 09 69 66 20 28 | 21 46 69 6e 64 47 72 6f |....if (|!FindGro|
|00001100| 75 70 28 74 68 65 49 6e | 66 6f 2c 67 72 6f 75 70 |up(theIn|fo,group|
|00001110| 53 74 72 2c 26 74 68 65 | 47 72 6f 75 70 29 29 20 |Str,&the|Group)) |
|00001120| 7b 0d 09 09 53 79 73 42 | 65 65 70 28 31 29 3b 0d |{...SysB|eep(1);.|
|00001130| 09 09 72 65 74 75 72 6e | 3b 0d 09 7d 0d 09 0d 09 |..return|;..}....|
|00001140| 73 74 72 63 70 79 28 28 | 63 68 61 72 20 2a 29 74 |strcpy((|char *)t|
|00001150| 6d 70 53 74 72 2c 74 68 | 65 47 72 6f 75 70 2d 3e |mpStr,th|eGroup->|
|00001160| 6e 61 6d 65 29 3b 0d 09 | 63 32 70 73 74 72 28 28 |name);..|c2pstr((|
|00001170| 63 68 61 72 20 2a 29 74 | 6d 70 53 74 72 29 3b 0d |char *)t|mpStr);.|
|00001180| 09 66 6f 72 20 28 74 6d | 70 57 69 6e 64 6f 77 20 |.for (tm|pWindow |
|00001190| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 3b |= FrontW|indow();|
|000011a0| 20 74 6d 70 57 69 6e 64 | 6f 77 20 21 3d 20 6e 69 | tmpWind|ow != ni|
|000011b0| 6c 3b 20 74 6d 70 57 69 | 6e 64 6f 77 20 3d 20 28 |l; tmpWi|ndow = (|
|000011c0| 57 69 6e 64 6f 77 50 74 | 72 29 20 28 28 57 69 6e |WindowPt|r) ((Win|
|000011d0| 64 6f 77 50 65 65 6b 29 | 74 6d 70 57 69 6e 64 6f |dowPeek)|tmpWindo|
|000011e0| 77 29 2d 3e 6e 65 78 74 | 57 69 6e 64 6f 77 29 20 |w)->next|Window) |
|000011f0| 7b 0d 09 09 47 65 74 57 | 54 69 74 6c 65 28 74 6d |{...GetW|Title(tm|
|00001200| 70 57 69 6e 64 6f 77 2c | 74 6d 70 54 69 74 6c 65 |pWindow,|tmpTitle|
|00001210| 29 3b 0d 09 09 69 66 20 | 28 45 71 75 61 6c 53 74 |);...if |(EqualSt|
|00001220| 72 69 6e 67 28 74 6d 70 | 53 74 72 2c 74 6d 70 54 |ring(tmp|Str,tmpT|
|00001230| 69 74 6c 65 2c 74 72 75 | 65 2c 74 72 75 65 29 29 |itle,tru|e,true))|
|00001240| 20 7b 0d 09 09 09 53 65 | 6c 65 63 74 57 69 6e 64 | {....Se|lectWind|
|00001250| 6f 77 28 74 6d 70 57 69 | 6e 64 6f 77 29 3b 0d 09 |ow(tmpWi|ndow);..|
|00001260| 09 09 72 65 74 75 72 6e | 3b 0d 09 09 7d 0d 09 7d |..return|;...}..}|
|00001270| 0d 09 0d 09 69 66 20 28 | 74 68 65 47 72 6f 75 70 |....if (|theGroup|
|00001280| 2d 3e 66 69 72 73 74 4d | 65 73 73 20 3e 20 30 20 |->firstM|ess > 0 |
|00001290| 26 26 0d 09 09 74 68 65 | 47 72 6f 75 70 2d 3e 6c |&&...the|Group->l|
|000012a0| 61 73 74 4d 65 73 73 3e | 20 30 20 26 26 0d 09 09 |astMess>| 0 &&...|
|000012b0| 74 68 65 47 72 6f 75 70 | 2d 3e 6c 61 73 74 4d 65 |theGroup|->lastMe|
|000012c0| 73 73 20 2d 20 74 68 65 | 47 72 6f 75 70 2d 3e 66 |ss - the|Group->f|
|000012d0| 69 72 73 74 4d 65 73 73 | 20 3e 3d 20 30 29 20 7b |irstMess| >= 0) {|
|000012e0| 0d 09 09 09 74 68 65 49 | 6e 66 6f 20 3d 20 28 54 |....theI|nfo = (T|
|000012f0| 77 69 6e 64 6f 77 49 6e | 66 6f 20 2a 29 20 47 65 |windowIn|fo *) Ge|
|00001300| 74 57 52 65 66 43 6f 6e | 28 74 68 65 57 69 6e 64 |tWRefCon|(theWind|
|00001310| 20 3d 20 4d 61 6b 65 4e | 65 77 57 69 6e 64 6f 77 | = MakeN|ewWindow|
|00001320| 28 63 53 75 62 6a 65 63 | 74 2c 74 72 75 65 2c 66 |(cSubjec|t,true,f|
|00001330| 69 72 73 74 4f 66 66 73 | 65 74 2c 28 63 68 61 72 |irstOffs|et,(char|
|00001340| 20 2a 29 74 6d 70 53 74 | 72 29 29 3b 0d 09 09 09 | *)tmpSt|r));....|
|00001350| 74 68 65 49 6e 66 6f 2d | 3e 70 61 72 65 6e 74 47 |theInfo-|>parentG|
|00001360| 72 6f 75 70 20 3d 20 6e | 69 6c 3b 0d 09 09 09 74 |roup = n|il;....t|
|00001370| 68 65 49 6e 66 6f 2d 3e | 63 68 69 6c 64 4c 69 73 |heInfo->|childLis|
|00001380| 74 20 3d 20 6e 69 6c 3b | 0d 09 09 09 74 68 65 49 |t = nil;|....theI|
|00001390| 6e 66 6f 2d 3e 70 61 72 | 65 6e 74 57 69 6e 64 6f |nfo->par|entWindo|
|000013a0| 77 20 3d 20 6e 69 6c 3b | 0d 09 09 09 49 6e 69 74 |w = nil;|....Init|
|000013b0| 53 75 62 6a 65 63 74 4c | 69 73 74 28 74 68 65 49 |SubjectL|ist(theI|
|000013c0| 6e 66 6f 29 3b 0d 09 09 | 09 53 74 61 74 75 73 57 |nfo);...|.StatusW|
|000013d0| 69 6e 64 6f 77 28 22 47 | 65 74 74 69 6e 67 20 53 |indow("G|etting S|
|000013e0| 75 62 6a 65 63 74 20 4c | 69 73 74 2e 2e 2e 22 2c |ubject L|ist...",|
|000013f0| 30 29 3b 0d 09 09 09 41 | 64 64 54 6f 53 75 62 6a |0);....A|ddToSubj|
|00001400| 65 63 74 4c 69 73 74 28 | 74 68 65 49 6e 66 6f 2c |ectList(|theInfo,|
|00001410| 74 68 65 47 72 6f 75 70 | 2d 3e 6e 61 6d 65 2c 0d |theGroup|->name,.|
|00001420| 09 09 09 09 09 09 09 74 | 68 65 47 72 6f 75 70 2d |.......t|heGroup-|
|00001430| 3e 66 69 72 73 74 4d 65 | 73 73 2c 74 68 65 47 72 |>firstMe|ss,theGr|
|00001440| 6f 75 70 2d 3e 6c 61 73 | 74 4d 65 73 73 29 3b 0d |oup->las|tMess);.|
|00001450| 09 09 09 53 74 61 74 75 | 73 57 69 6e 64 6f 77 28 |...Statu|sWindow(|
|00001460| 22 47 65 74 74 69 6e 67 | 20 53 75 62 6a 65 63 74 |"Getting| Subject|
|00001470| 20 4c 69 73 74 2e 2e 2e | 22 2c 31 30 30 29 3b 0d | List...|",100);.|
|00001480| 09 09 09 47 69 76 65 54 | 69 6d 65 28 30 29 3b 0d |...GiveT|ime(0);.|
|00001490| 09 09 09 43 6c 6f 73 65 | 53 74 61 74 75 73 57 69 |...Close|StatusWi|
|000014a0| 6e 64 6f 77 28 29 3b 0d | 09 09 09 53 65 74 50 74 |ndow();.|...SetPt|
|000014b0| 28 26 74 68 65 50 74 2c | 30 2c 30 29 3b 0d 09 09 |(&thePt,|0,0);...|
|000014c0| 09 4c 53 65 74 53 65 6c | 65 63 74 28 74 72 75 65 |.LSetSel|ect(true|
|000014d0| 2c 74 68 65 50 74 2c 28 | 4c 69 73 74 48 61 6e 64 |,thePt,(|ListHand|
|000014e0| 6c 65 29 74 68 65 49 6e | 66 6f 2d 3e 64 61 74 61 |le)theIn|fo->data|
|000014f0| 29 3b 0d 0d 09 09 09 69 | 66 20 28 67 50 72 65 66 |);.....i|f (gPref|
|00001500| 73 2e 6f 70 65 6e 57 69 | 6e 64 6f 77 73 5a 6f 6f |s.openWi|ndowsZoo|
|00001510| 6d 65 64 29 0d 09 09 09 | 09 54 6f 67 67 6c 65 5a |med)....|.ToggleZ|
|00001520| 6f 6f 6d 28 74 68 65 57 | 69 6e 64 29 3b 0d 09 09 |oom(theW|ind);...|
|00001530| 09 53 68 6f 77 57 69 6e | 64 6f 77 28 74 68 65 57 |.ShowWin|dow(theW|
|00001540| 69 6e 64 29 3b 0d 09 09 | 09 0d 09 09 09 47 65 74 |ind);...|.....Get|
|00001550| 50 6f 72 74 28 26 73 61 | 76 65 50 6f 72 74 29 3b |Port(&sa|vePort);|
|00001560| 0d 09 09 09 53 65 74 50 | 6f 72 74 28 74 68 65 57 |....SetP|ort(theW|
|00001570| 69 6e 64 29 3b 0d 09 09 | 09 49 6e 76 61 6c 52 65 |ind);...|.InvalRe|
|00001580| 63 74 28 26 74 68 65 57 | 69 6e 64 2d 3e 70 6f 72 |ct(&theW|ind->por|
|00001590| 74 52 65 63 74 29 3b 0d | 09 09 09 53 65 74 50 6f |tRect);.|...SetPo|
|000015a0| 72 74 28 73 61 76 65 50 | 6f 72 74 29 3b 0d 09 7d |rt(saveP|ort);..}|
|000015b0| 0d 09 65 6c 73 65 0d 09 | 09 53 79 73 42 65 65 70 |..else..|.SysBeep|
|000015c0| 28 31 29 3b 0d 7d 0d 0d | 0d 2f 2a 09 48 61 6e 64 |(1);.}..|./*.Hand|
|000015d0| 6c 65 55 73 65 72 47 72 | 6f 75 70 53 65 6c 65 63 |leUserGr|oupSelec|
|000015e0| 74 20 69 73 20 63 61 6c | 6c 65 64 20 69 6e 20 72 |t is cal|led in r|
|000015f0| 65 73 70 6f 6e 73 65 20 | 74 6f 20 61 20 6d 6f 75 |esponse |to a mou|
|00001600| 73 65 0d 09 64 6f 77 6e | 20 69 6e 20 61 20 75 73 |se..down| in a us|
|00001610| 65 72 20 67 72 6f 75 70 | 20 77 69 6e 64 6f 77 2e |er group| window.|
|00001620| 20 20 49 74 20 6f 70 65 | 6e 73 20 61 20 77 69 6e | It ope|ns a win|
|00001630| 64 6f 77 20 63 6f 6e 74 | 61 69 6e 69 6e 67 0d 09 |dow cont|aining..|
|00001640| 74 68 65 20 73 75 62 6a | 65 63 74 73 20 6f 66 20 |the subj|ects of |
|00001650| 61 6c 6c 20 75 6e 72 65 | 61 64 20 61 72 74 69 63 |all unre|ad artic|
|00001660| 6c 65 73 20 69 6e 20 74 | 68 61 74 20 67 72 6f 75 |les in t|hat grou|
|00001670| 70 2e 0d 2a 2f 0d 0d 76 | 6f 69 64 20 48 61 6e 64 |p..*/..v|oid Hand|
|00001680| 6c 65 55 73 65 72 47 72 | 6f 75 70 53 65 6c 65 63 |leUserGr|oupSelec|
|00001690| 74 28 43 65 6c 6c 20 74 | 68 65 43 65 6c 6c 2c 57 |t(Cell t|heCell,W|
|000016a0| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 29 |indowPtr| window)|
|000016b0| 0d 7b 0d 09 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 |.{..Twin|dowInfo |
|000016c0| 2a 74 68 65 49 6e 66 6f | 3b 0d 09 57 69 6e 64 6f |*theInfo|;..Windo|
|000016d0| 77 50 74 72 20 74 68 65 | 57 69 6e 64 3b 0d 09 53 |wPtr the|Wind;..S|
|000016e0| 74 72 32 35 35 20 74 6d | 70 53 74 72 2c 74 6d 70 |tr255 tm|pStr,tmp|
|000016f0| 54 69 74 6c 65 3b 0d 09 | 54 47 72 6f 75 70 20 2a |Title;..|TGroup *|
|00001700| 74 68 65 47 72 6f 75 70 | 3b 0d 09 47 72 61 66 50 |theGroup|;..GrafP|
|00001710| 74 72 20 73 61 76 65 50 | 6f 72 74 3b 0d 09 4c 69 |tr saveP|ort;..Li|
|00001720| 73 74 48 61 6e 64 6c 65 | 20 74 68 65 4c 69 73 74 |stHandle| theList|
|00001730| 3b 0d 09 63 68 61 72 20 | 67 72 6f 75 70 4e 61 6d |;..char |groupNam|
|00001740| 65 5b 32 35 36 5d 3b 0d | 09 73 68 6f 72 74 20 67 |e[256];.|.short g|
|00001750| 72 6f 75 70 4c 65 6e 20 | 3d 20 32 35 35 3b 0d 09 |roupLen |= 255;..|
|00001760| 54 52 65 61 64 52 65 63 | 20 2a 72 65 61 64 3b 0d |TReadRec| *read;.|
|00001770| 09 57 69 6e 64 6f 77 50 | 74 72 20 70 61 72 65 6e |.WindowP|tr paren|
|00001780| 74 3b 0d 09 50 6f 69 6e | 74 20 66 69 72 73 74 4f |t;..Poin|t firstO|
|00001790| 66 66 73 65 74 3b 0d 09 | 57 69 6e 64 6f 77 50 74 |ffset;..|WindowPt|
|000017a0| 72 20 74 6d 70 57 69 6e | 64 6f 77 3b 0d 09 65 78 |r tmpWin|dow;..ex|
|000017b0| 74 65 72 6e 20 54 50 72 | 65 66 52 65 63 20 67 50 |tern TPr|efRec gP|
|000017c0| 72 65 66 73 3b 0d 09 0d | 09 53 65 74 50 74 28 26 |refs;...|.SetPt(&|
|000017d0| 66 69 72 73 74 4f 66 66 | 73 65 74 2c 30 2c 30 29 |firstOff|set,0,0)|
|000017e0| 3b 0d 09 47 65 74 50 6f | 72 74 28 26 73 61 76 65 |;..GetPo|rt(&save|
|000017f0| 50 6f 72 74 29 3b 0d 09 | 53 65 74 50 6f 72 74 28 |Port);..|SetPort(|
|00001800| 77 69 6e 64 6f 77 29 3b | 0d 09 4c 6f 63 61 6c 54 |window);|..LocalT|
|00001810| 6f 47 6c 6f 62 61 6c 28 | 26 66 69 72 73 74 4f 66 |oGlobal(|&firstOf|
|00001820| 66 73 65 74 29 3b 0d 09 | 53 65 74 50 6f 72 74 28 |fset);..|SetPort(|
|00001830| 73 61 76 65 50 6f 72 74 | 29 3b 0d 0d 09 74 68 65 |savePort|);...the|
|00001840| 49 6e 66 6f 20 3d 20 28 | 54 77 69 6e 64 6f 77 49 |Info = (|TwindowI|
|00001850| 6e 66 6f 20 2a 29 47 65 | 74 57 52 65 66 43 6f 6e |nfo *)Ge|tWRefCon|
|00001860| 28 77 69 6e 64 6f 77 29 | 3b 0d 09 74 68 65 49 6e |(window)|;..theIn|
|00001870| 66 6f 2d 3e 63 68 61 6e | 67 65 64 20 3d 20 74 72 |fo->chan|ged = tr|
|00001880| 75 65 3b 0d 09 0d 09 74 | 68 65 4c 69 73 74 20 3d |ue;....t|heList =|
|00001890| 20 28 4c 69 73 74 48 61 | 6e 64 6c 65 29 20 74 68 | (ListHa|ndle) th|
|000018a0| 65 49 6e 66 6f 2d 3e 64 | 61 74 61 3b 0d 09 4c 47 |eInfo->d|ata;..LG|
|000018b0| 65 74 43 65 6c 6c 28 67 | 72 6f 75 70 4e 61 6d 65 |etCell(g|roupName|
|000018c0| 2c 26 67 72 6f 75 70 4c | 65 6e 2c 74 68 65 43 65 |,&groupL|en,theCe|
|000018d0| 6c 6c 2c 74 68 65 4c 69 | 73 74 29 3b 0d 0d 09 73 |ll,theLi|st);...s|
|000018e0| 74 72 63 70 79 28 28 63 | 68 61 72 20 2a 29 74 6d |trcpy((c|har *)tm|
|000018f0| 70 53 74 72 2c 67 72 6f | 75 70 4e 61 6d 65 29 3b |pStr,gro|upName);|
|00001900| 0d 09 63 32 70 73 74 72 | 28 28 63 68 61 72 20 2a |..c2pstr|((char *|
|00001910| 29 74 6d 70 53 74 72 29 | 3b 0d 09 0d 09 2f 2a 20 |)tmpStr)|;..../* |
|00001920| 6d 61 6b 65 20 73 75 72 | 65 20 67 72 6f 75 70 20 |make sur|e group |
|00001930| 77 69 6e 64 6f 77 20 69 | 73 20 6e 6f 74 20 61 6c |window i|s not al|
|00001940| 72 65 61 64 79 20 6f 70 | 65 6e 20 2a 2f 0d 09 0d |ready op|en */...|
|00001950| 09 66 6f 72 20 28 74 6d | 70 57 69 6e 64 6f 77 20 |.for (tm|pWindow |
|00001960| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 3b |= FrontW|indow();|
|00001970| 20 74 6d 70 57 69 6e 64 | 6f 77 20 21 3d 20 6e 69 | tmpWind|ow != ni|
|00001980| 6c 3b 20 74 6d 70 57 69 | 6e 64 6f 77 20 3d 20 28 |l; tmpWi|ndow = (|
|00001990| 57 69 6e 64 6f 77 50 74 | 72 29 20 28 28 57 69 6e |WindowPt|r) ((Win|
|000019a0| 64 6f 77 50 65 65 6b 29 | 74 6d 70 57 69 6e 64 6f |dowPeek)|tmpWindo|
|000019b0| 77 29 2d 3e 6e 65 78 74 | 57 69 6e 64 6f 77 29 20 |w)->next|Window) |
|000019c0| 7b 0d 09 09 47 65 74 57 | 54 69 74 6c 65 28 74 6d |{...GetW|Title(tm|
|000019d0| 70 57 69 6e 64 6f 77 2c | 74 6d 70 54 69 74 6c 65 |pWindow,|tmpTitle|
|000019e0| 29 3b 0d 09 09 69 66 20 | 28 45 71 75 61 6c 53 74 |);...if |(EqualSt|
|000019f0| 72 69 6e 67 28 74 6d 70 | 53 74 72 2c 74 6d 70 54 |ring(tmp|Str,tmpT|
|00001a00| 69 74 6c 65 2c 74 72 75 | 65 2c 74 72 75 65 29 29 |itle,tru|e,true))|
|00001a10| 20 7b 0d 09 09 09 53 65 | 6c 65 63 74 57 69 6e 64 | {....Se|lectWind|
|00001a20| 6f 77 28 74 6d 70 57 69 | 6e 64 6f 77 29 3b 0d 09 |ow(tmpWi|ndow);..|
|00001a30| 09 09 72 65 74 75 72 6e | 3b 0d 09 09 7d 0d 09 7d |..return|;...}..}|
|00001a40| 0d 09 0d 09 2f 2a 20 73 | 65 61 72 63 68 20 6c 69 |..../* s|earch li|
|00001a50| 6e 6b 65 64 20 69 6e 66 | 6f 20 6c 69 73 74 20 66 |nked inf|o list f|
|00001a60| 6f 72 20 67 72 6f 75 70 | 20 69 6e 66 6f 20 2a 2f |or group| info */|
|00001a70| 0d 09 0d 09 0d 09 69 66 | 20 28 21 46 69 6e 64 47 |......if| (!FindG|
|00001a80| 72 6f 75 70 28 74 68 65 | 49 6e 66 6f 2c 67 72 6f |roup(the|Info,gro|
|00001a90| 75 70 4e 61 6d 65 2c 26 | 74 68 65 47 72 6f 75 70 |upName,&|theGroup|
|00001aa0| 29 20 7c 7c 20 21 74 68 | 65 47 72 6f 75 70 2d 3e |) || !th|eGroup->|
|00001ab0| 72 65 61 64 29 20 7b 0d | 09 09 53 79 73 42 65 65 |read) {.|..SysBee|
|00001ac0| 70 28 31 29 3b 0d 09 09 | 72 65 74 75 72 6e 3b 0d |p(1);...|return;.|
|00001ad0| 09 7d 0d 0d 09 73 74 72 | 63 70 79 28 28 63 68 61 |.}...str|cpy((cha|
|00001ae0| 72 20 2a 29 74 6d 70 53 | 74 72 2c 74 68 65 47 72 |r *)tmpS|tr,theGr|
|00001af0| 6f 75 70 2d 3e 6e 61 6d | 65 29 3b 0d 09 0d 09 70 |oup->nam|e);....p|
|00001b00| 61 72 65 6e 74 20 3d 20 | 77 69 6e 64 6f 77 3b 0d |arent = |window;.|
|00001b10| 09 74 68 65 49 6e 66 6f | 20 3d 20 28 54 77 69 6e |.theInfo| = (Twin|
|00001b20| 64 6f 77 49 6e 66 6f 20 | 2a 29 20 47 65 74 57 52 |dowInfo |*) GetWR|
|00001b30| 65 66 43 6f 6e 28 74 68 | 65 57 69 6e 64 20 3d 20 |efCon(th|eWind = |
|00001b40| 4d 61 6b 65 4e 65 77 57 | 69 6e 64 6f 77 28 63 53 |MakeNewW|indow(cS|
|00001b50| 75 62 6a 65 63 74 2c 74 | 72 75 65 2c 66 69 72 73 |ubject,t|rue,firs|
|00001b60| 74 4f 66 66 73 65 74 2c | 28 63 68 61 72 20 2a 29 |tOffset,|(char *)|
|00001b70| 63 32 70 73 74 72 28 28 | 63 68 61 72 20 2a 29 74 |c2pstr((|char *)t|
|00001b80| 6d 70 53 74 72 29 29 29 | 3b 0d 09 74 68 65 49 6e |mpStr)))|;..theIn|
|00001b90| 66 6f 2d 3e 70 61 72 65 | 6e 74 47 72 6f 75 70 20 |fo->pare|ntGroup |
|00001ba0| 3d 20 74 68 65 47 72 6f | 75 70 3b 0d 09 74 68 65 |= theGro|up;..the|
|00001bb0| 49 6e 66 6f 2d 3e 70 61 | 72 65 6e 74 57 69 6e 64 |Info->pa|rentWind|
|00001bc0| 6f 77 20 3d 20 70 61 72 | 65 6e 74 3b 0d 09 74 68 |ow = par|ent;..th|
|00001bd0| 65 49 6e 66 6f 2d 3e 63 | 68 69 6c 64 4c 69 73 74 |eInfo->c|hildList|
|00001be0| 20 3d 20 6e 69 6c 3b 0d | 09 41 64 64 43 68 69 6c | = nil;.|.AddChil|
|00001bf0| 64 28 70 61 72 65 6e 74 | 2c 74 68 65 57 69 6e 64 |d(parent|,theWind|
|00001c00| 29 3b 0d 09 0d 09 49 6e | 69 74 53 75 62 6a 65 63 |);....In|itSubjec|
|00001c10| 74 4c 69 73 74 28 74 68 | 65 49 6e 66 6f 29 3b 09 |tList(th|eInfo);.|
|00001c20| 09 0d 09 0d 09 53 74 61 | 74 75 73 57 69 6e 64 6f |.....Sta|tusWindo|
|00001c30| 77 28 22 47 65 74 74 69 | 6e 67 20 53 75 62 6a 65 |w("Getti|ng Subje|
|00001c40| 63 74 20 4c 69 73 74 2e | 2e 2e 22 2c 30 29 3b 0d |ct List.|..",0);.|
|00001c50| 09 66 6f 72 20 28 72 65 | 61 64 20 3d 20 74 68 65 |.for (re|ad = the|
|00001c60| 47 72 6f 75 70 2d 3e 72 | 65 61 64 3b 20 72 65 61 |Group->r|ead; rea|
|00001c70| 64 21 3d 6e 69 6c 3b 20 | 72 65 61 64 20 3d 20 72 |d!=nil; |read = r|
|00001c80| 65 61 64 2d 3e 6e 65 78 | 74 29 0d 09 09 41 64 64 |ead->nex|t)...Add|
|00001c90| 54 6f 53 75 62 6a 65 63 | 74 4c 69 73 74 28 74 68 |ToSubjec|tList(th|
|00001ca0| 65 49 6e 66 6f 2c 74 68 | 65 47 72 6f 75 70 2d 3e |eInfo,th|eGroup->|
|00001cb0| 6e 61 6d 65 2c 72 65 61 | 64 2d 3e 66 69 72 73 74 |name,rea|d->first|
|00001cc0| 52 65 61 64 2c 72 65 61 | 64 2d 3e 6c 61 73 74 52 |Read,rea|d->lastR|
|00001cd0| 65 61 64 29 3b 0d 09 53 | 74 61 74 75 73 57 69 6e |ead);..S|tatusWin|
|00001ce0| 64 6f 77 28 22 47 65 74 | 74 69 6e 67 20 53 75 62 |dow("Get|ting Sub|
|00001cf0| 6a 65 63 74 20 4c 69 73 | 74 2e 2e 2e 22 2c 31 30 |ject Lis|t...",10|
|00001d00| 30 29 3b 0d 09 47 69 76 | 65 54 69 6d 65 28 30 29 |0);..Giv|eTime(0)|
|00001d10| 3b 0d 09 43 6c 6f 73 65 | 53 74 61 74 75 73 57 69 |;..Close|StatusWi|
|00001d20| 6e 64 6f 77 28 29 3b 0d | 09 0d 09 53 65 74 50 74 |ndow();.|...SetPt|
|00001d30| 28 26 74 68 65 43 65 6c | 6c 2c 30 2c 30 29 3b 0d |(&theCel|l,0,0);.|
|00001d40| 09 4c 53 65 74 53 65 6c | 65 63 74 28 74 72 75 65 |.LSetSel|ect(true|
|00001d50| 2c 74 68 65 43 65 6c 6c | 2c 28 4c 69 73 74 48 61 |,theCell|,(ListHa|
|00001d60| 6e 64 6c 65 29 74 68 65 | 49 6e 66 6f 2d 3e 64 61 |ndle)the|Info->da|
|00001d70| 74 61 29 3b 0d 0d 09 69 | 66 20 28 67 50 72 65 66 |ta);...i|f (gPref|
|00001d80| 73 2e 6f 70 65 6e 57 69 | 6e 64 6f 77 73 5a 6f 6f |s.openWi|ndowsZoo|
|00001d90| 6d 65 64 29 0d 09 09 54 | 6f 67 67 6c 65 5a 6f 6f |med)...T|oggleZoo|
|00001da0| 6d 28 74 68 65 57 69 6e | 64 29 3b 0d 09 53 68 6f |m(theWin|d);..Sho|
|00001db0| 77 57 69 6e 64 6f 77 28 | 74 68 65 57 69 6e 64 29 |wWindow(|theWind)|
|00001dc0| 3b 0d 09 0d 09 47 65 74 | 50 6f 72 74 28 26 73 61 |;....Get|Port(&sa|
|00001dd0| 76 65 50 6f 72 74 29 3b | 0d 09 53 65 74 50 6f 72 |vePort);|..SetPor|
|00001de0| 74 28 74 68 65 57 69 6e | 64 29 3b 0d 09 49 6e 76 |t(theWin|d);..Inv|
|00001df0| 61 6c 52 65 63 74 28 26 | 74 68 65 57 69 6e 64 2d |alRect(&|theWind-|
|00001e00| 3e 70 6f 72 74 52 65 63 | 74 29 3b 0d 09 53 65 74 |>portRec|t);..Set|
|00001e10| 50 6f 72 74 28 73 61 76 | 65 50 6f 72 74 29 3b 0d |Port(sav|ePort);.|
|00001e20| 7d 0d 0d 0d 2f 2a 09 46 | 69 6e 64 47 72 6f 75 70 |}.../*.F|indGroup|
|00001e30| 20 6c 6f 63 61 74 65 73 | 20 61 20 75 73 65 72 20 | locates| a user |
|00001e40| 67 72 6f 75 70 20 72 65 | 63 6f 72 64 20 77 69 74 |group re|cord wit|
|00001e50| 68 69 6e 20 74 68 65 20 | 6c 69 6e 6b 65 64 20 6c |hin the |linked l|
|00001e60| 69 73 74 0d 09 6f 66 20 | 75 73 65 72 20 67 72 6f |ist..of |user gro|
|00001e70| 75 70 73 2c 20 67 69 76 | 65 6e 20 74 68 65 20 6e |ups, giv|en the n|
|00001e80| 61 6d 65 20 6f 66 20 74 | 68 65 20 67 72 6f 75 70 |ame of t|he group|
|00001e90| 2e 0d 2a 2f 0d 0d 42 6f | 6f 6c 65 61 6e 20 46 69 |..*/..Bo|olean Fi|
|00001ea0| 6e 64 47 72 6f 75 70 28 | 54 77 69 6e 64 6f 77 49 |ndGroup(|TwindowI|
|00001eb0| 6e 66 6f 20 2a 69 6e 66 | 6f 2c 63 68 61 72 20 2a |nfo *inf|o,char *|
|00001ec0| 67 72 6f 75 70 4e 61 6d | 65 2c 54 47 72 6f 75 70 |groupNam|e,TGroup|
|00001ed0| 20 2a 2a 74 68 65 47 72 | 6f 75 70 29 0d 7b 0d 09 | **theGr|oup).{..|
|00001ee0| 2a 74 68 65 47 72 6f 75 | 70 20 3d 20 6e 69 6c 3b |*theGrou|p = nil;|
|00001ef0| 0d 09 0d 09 69 66 20 28 | 69 6e 66 6f 2d 3e 6b 69 |....if (|info->ki|
|00001f00| 6e 64 20 3d 3d 20 63 47 | 72 6f 75 70 20 7c 7c 20 |nd == cG|roup || |
|00001f10| 69 6e 66 6f 2d 3e 6b 69 | 6e 64 20 3d 3d 20 63 4e |info->ki|nd == cN|
|00001f20| 65 77 47 72 6f 75 70 29 | 0d 09 09 2a 74 68 65 47 |ewGroup)|...*theG|
|00001f30| 72 6f 75 70 20 3d 20 62 | 73 65 61 72 63 68 28 67 |roup = b|search(g|
|00001f40| 72 6f 75 70 4e 61 6d 65 | 2c 28 54 47 72 6f 75 70 |roupName|,(TGroup|
|00001f50| 20 2a 29 69 6e 66 6f 2d | 3e 64 61 74 61 32 2c 69 | *)info-|>data2,i|
|00001f60| 6e 66 6f 2d 3e 6e 75 6d | 47 72 6f 75 70 73 2c 73 |nfo->num|Groups,s|
|00001f70| 69 7a 65 6f 66 28 54 47 | 72 6f 75 70 29 2c 53 65 |izeof(TG|roup),Se|
|00001f80| 61 72 63 68 43 6f 6d 70 | 61 72 65 29 3b 0d 09 65 |archComp|are);..e|
|00001f90| 6c 73 65 20 69 66 20 28 | 69 6e 66 6f 2d 3e 6b 69 |lse if (|info->ki|
|00001fa0| 6e 64 20 3d 3d 20 63 55 | 73 65 72 47 72 6f 75 70 |nd == cU|serGroup|
|00001fb0| 29 0d 09 09 66 6f 72 20 | 28 2a 74 68 65 47 72 6f |)...for |(*theGro|
|00001fc0| 75 70 20 3d 20 28 54 47 | 72 6f 75 70 20 2a 29 69 |up = (TG|roup *)i|
|00001fd0| 6e 66 6f 2d 3e 64 61 74 | 61 32 3b 0d 09 09 09 09 |nfo->dat|a2;.....|
|00001fe0| 09 09 2a 74 68 65 47 72 | 6f 75 70 20 21 3d 20 6e |..*theGr|oup != n|
|00001ff0| 69 6c 20 26 26 20 73 74 | 72 63 6d 70 28 28 2a 74 |il && st|rcmp((*t|
|00002000| 68 65 47 72 6f 75 70 29 | 2d 3e 6e 61 6d 65 2c 67 |heGroup)|->name,g|
|00002010| 72 6f 75 70 4e 61 6d 65 | 29 21 3d 30 3b 0d 09 09 |roupName|)!=0;...|
|00002020| 09 09 09 09 2a 74 68 65 | 47 72 6f 75 70 20 3d 20 |....*the|Group = |
|00002030| 28 2a 74 68 65 47 72 6f | 75 70 29 2d 3e 6e 65 78 |(*theGro|up)->nex|
|00002040| 74 29 0d 09 09 09 3b 0d | 09 09 09 0d 09 72 65 74 |t)....;.|.....ret|
|00002050| 75 72 6e 20 28 2a 74 68 | 65 47 72 6f 75 70 20 21 |urn (*th|eGroup !|
|00002060| 3d 20 6e 69 6c 29 3b 0d | 7d 0d 0d 0d 2f 2a 09 53 |= nil);.|}.../*.S|
|00002070| 65 61 72 63 68 43 6f 6d | 70 61 72 65 20 69 73 20 |earchCom|pare is |
|00002080| 75 73 65 64 20 69 6e 20 | 74 68 65 20 62 73 65 61 |used in |the bsea|
|00002090| 72 63 68 28 29 20 63 61 | 6c 6c 20 77 69 74 68 69 |rch() ca|ll withi|
|000020a0| 6e 20 46 69 6e 64 47 72 | 6f 75 70 2e 0d 09 49 74 |n FindGr|oup...It|
|000020b0| 20 69 73 20 75 73 65 64 | 20 74 6f 20 63 6f 6d 70 | is used| to comp|
|000020c0| 61 72 65 20 65 61 63 68 | 20 69 6e 73 74 61 6e 63 |are each| instanc|
|000020d0| 65 20 6f 66 20 67 72 6f | 75 70 20 6e 61 6d 65 20 |e of gro|up name |
|000020e0| 74 6f 20 74 68 65 0d 09 | 6e 61 6d 65 20 70 72 6f |to the..|name pro|
|000020f0| 76 69 64 65 64 2e 0d 2a | 2f 0d 0d 69 6e 74 20 53 |vided..*|/..int S|
|00002100| 65 61 72 63 68 43 6f 6d | 70 61 72 65 28 63 68 61 |earchCom|pare(cha|
|00002110| 72 20 2a 6b 65 79 2c 54 | 47 72 6f 75 70 20 2a 6d |r *key,T|Group *m|
|00002120| 65 6d 62 65 72 29 0d 7b | 0d 09 72 65 74 75 72 6e |ember).{|..return|
|00002130| 20 28 73 74 72 63 6d 70 | 28 6b 65 79 2c 6d 65 6d | (strcmp|(key,mem|
|00002140| 62 65 72 2d 3e 6e 61 6d | 65 29 29 3b 0d 7d 0d 0d |ber->nam|e));.}..|
|00002150| 0d 2f 2a 09 48 61 6e 64 | 6c 65 53 75 62 6a 65 63 |./*.Hand|leSubjec|
|00002160| 74 53 65 6c 65 63 74 20 | 69 73 20 63 61 6c 6c 65 |tSelect |is calle|
|00002170| 64 20 69 6e 20 72 65 73 | 70 6f 6e 73 65 20 74 6f |d in res|ponse to|
|00002180| 20 61 20 6d 6f 75 73 65 | 20 64 6f 77 6e 20 69 6e | a mouse| down in|
|00002190| 20 61 0d 09 73 75 62 6a | 65 63 74 20 6c 69 73 74 | a..subj|ect list|
|000021a0| 20 77 69 6e 64 6f 77 2e | 20 20 49 6e 20 74 68 69 | window.| In thi|
|000021b0| 73 20 63 61 73 65 2c 20 | 74 68 65 20 61 72 74 69 |s case, |the arti|
|000021c0| 63 6c 65 20 77 68 6f 73 | 65 20 73 75 62 6a 65 63 |cle whos|e subjec|
|000021d0| 74 0d 09 77 61 73 20 73 | 65 6c 65 63 74 65 64 20 |t..was s|elected |
|000021e0| 69 73 20 6f 70 65 6e 65 | 64 20 69 6e 20 61 6e 20 |is opene|d in an |
|000021f0| 61 72 74 69 63 6c 65 20 | 77 69 6e 64 6f 77 2e 0d |article |window..|
|00002200| 2a 2f 0d 0d 76 6f 69 64 | 20 48 61 6e 64 6c 65 53 |*/..void| HandleS|
|00002210| 75 62 6a 65 63 74 53 65 | 6c 65 63 74 28 43 65 6c |ubjectSe|lect(Cel|
|00002220| 6c 20 74 68 65 43 65 6c | 6c 2c 57 69 6e 64 6f 77 |l theCel|l,Window|
|00002230| 50 74 72 20 77 69 6e 64 | 29 0d 7b 0d 09 54 77 69 |Ptr wind|).{..Twi|
|00002240| 6e 64 6f 77 49 6e 66 6f | 20 2a 69 6e 66 6f 2c 2a |ndowInfo| *info,*|
|00002250| 61 72 74 69 63 6c 65 49 | 6e 66 6f 3b 0d 09 63 68 |articleI|nfo;..ch|
|00002260| 61 72 20 6e 65 77 73 47 | 72 6f 75 70 5b 32 35 36 |ar newsG|roup[256|
|00002270| 5d 2c 6e 75 6d 53 74 72 | 5b 32 35 36 5d 2c 74 69 |],numStr|[256],ti|
|00002280| 74 6c 65 5b 32 35 36 5d | 3b 0d 09 63 68 61 72 20 |tle[256]|;..char |
|00002290| 2a 74 6d 70 53 74 72 2c | 2a 74 6d 70 53 74 72 32 |*tmpStr,|*tmpStr2|
|000022a0| 3b 0d 09 6c 6f 6e 67 20 | 6e 75 6d 62 65 72 3b 0d |;..long |number;.|
|000022b0| 09 73 68 6f 72 74 20 6e | 61 6d 65 4c 65 6e 3b 0d |.short n|ameLen;.|
|000022c0| 09 73 68 6f 72 74 20 69 | 3b 0d 09 53 74 72 32 35 |.short i|;..Str25|
|000022d0| 35 20 74 6d 70 54 69 74 | 6c 65 31 2c 74 6d 70 54 |5 tmpTit|le1,tmpT|
|000022e0| 69 74 6c 65 32 3b 0d 09 | 57 69 6e 64 6f 77 50 74 |itle2;..|WindowPt|
|000022f0| 72 20 74 6d 70 57 69 6e | 64 6f 77 3b 0d 09 0d 09 |r tmpWin|dow;....|
|00002300| 69 6e 66 6f 20 3d 20 28 | 54 77 69 6e 64 6f 77 49 |info = (|TwindowI|
|00002310| 6e 66 6f 20 2a 29 20 47 | 65 74 57 52 65 66 43 6f |nfo *) G|etWRefCo|
|00002320| 6e 28 77 69 6e 64 29 3b | 09 0d 09 47 65 74 57 54 |n(wind);|...GetWT|
|00002330| 69 74 6c 65 28 77 69 6e | 64 2c 6e 65 77 73 47 72 |itle(win|d,newsGr|
|00002340| 6f 75 70 29 3b 0d 09 70 | 32 63 73 74 72 28 6e 65 |oup);..p|2cstr(ne|
|00002350| 77 73 47 72 6f 75 70 29 | 3b 0d 09 0d 09 6e 61 6d |wsGroup)|;....nam|
|00002360| 65 4c 65 6e 20 3d 20 32 | 35 36 3b 0d 09 4c 47 65 |eLen = 2|56;..LGe|
|00002370| 74 43 65 6c 6c 28 74 69 | 74 6c 65 2c 26 6e 61 6d |tCell(ti|tle,&nam|
|00002380| 65 4c 65 6e 2c 74 68 65 | 43 65 6c 6c 2c 28 4c 69 |eLen,the|Cell,(Li|
|00002390| 73 74 48 61 6e 64 6c 65 | 29 69 6e 66 6f 2d 3e 64 |stHandle|)info->d|
|000023a0| 61 74 61 29 3b 0d 0d 09 | 73 74 72 63 70 79 28 28 |ata);...|strcpy((|
|000023b0| 63 68 61 72 20 2a 29 74 | 6d 70 54 69 74 6c 65 31 |char *)t|mpTitle1|
|000023c0| 2c 74 69 74 6c 65 29 3b | 0d 09 63 32 70 73 74 72 |,title);|..c2pstr|
|000023d0| 28 28 63 68 61 72 20 2a | 29 74 6d 70 54 69 74 6c |((char *|)tmpTitl|
|000023e0| 65 31 29 3b 0d 09 66 6f | 72 20 28 74 6d 70 57 69 |e1);..fo|r (tmpWi|
|000023f0| 6e 64 6f 77 20 3d 20 46 | 72 6f 6e 74 57 69 6e 64 |ndow = F|rontWind|
|00002400| 6f 77 28 29 3b 20 74 6d | 70 57 69 6e 64 6f 77 20 |ow(); tm|pWindow |
|00002410| 21 3d 20 6e 69 6c 3b 20 | 74 6d 70 57 69 6e 64 6f |!= nil; |tmpWindo|
|00002420| 77 20 3d 20 28 57 69 6e | 64 6f 77 50 74 72 29 20 |w = (Win|dowPtr) |
|00002430| 28 28 57 69 6e 64 6f 77 | 50 65 65 6b 29 74 6d 70 |((Window|Peek)tmp|
|00002440| 57 69 6e 64 6f 77 29 2d | 3e 6e 65 78 74 57 69 6e |Window)-|>nextWin|
|00002450| 64 6f 77 29 20 7b 0d 09 | 09 47 65 74 57 54 69 74 |dow) {..|.GetWTit|
|00002460| 6c 65 28 74 6d 70 57 69 | 6e 64 6f 77 2c 74 6d 70 |le(tmpWi|ndow,tmp|
|00002470| 54 69 74 6c 65 32 29 3b | 0d 09 09 69 66 20 28 45 |Title2);|...if (E|
|00002480| 71 75 61 6c 53 74 72 69 | 6e 67 28 74 6d 70 54 69 |qualStri|ng(tmpTi|
|00002490| 74 6c 65 31 2c 74 6d 70 | 54 69 74 6c 65 32 2c 74 |tle1,tmp|Title2,t|
|000024a0| 72 75 65 2c 74 72 75 65 | 29 29 20 7b 0d 09 09 09 |rue,true|)) {....|
|000024b0| 53 65 6c 65 63 74 57 69 | 6e 64 6f 77 28 74 6d 70 |SelectWi|ndow(tmp|
|000024c0| 57 69 6e 64 6f 77 29 3b | 0d 09 09 09 72 65 74 75 |Window);|....retu|
|000024d0| 72 6e 3b 0d 09 09 7d 0d | 09 7d 0d 0d 09 66 6f 72 |rn;...}.|.}...for|
|000024e0| 20 28 74 6d 70 53 74 72 | 20 3d 20 6e 75 6d 53 74 | (tmpStr| = numSt|
|000024f0| 72 2c 74 6d 70 53 74 72 | 32 20 3d 20 74 69 74 6c |r,tmpStr|2 = titl|
|00002500| 65 2b 31 3b 0d 09 09 2a | 74 6d 70 53 74 72 32 20 |e+1;...*|tmpStr2 |
|00002510| 21 3d 20 27 20 27 20 26 | 26 20 2a 74 6d 70 53 74 |!= ' ' &|& *tmpSt|
|00002520| 72 32 20 21 3d 20 27 5c | 30 27 3b 0d 09 09 2a 74 |r2 != '\|0';...*t|
|00002530| 6d 70 53 74 72 2b 2b 20 | 3d 20 2a 74 6d 70 53 74 |mpStr++ |= *tmpSt|
|00002540| 72 32 2b 2b 29 0d 09 09 | 3b 0d 09 2a 74 6d 70 53 |r2++)...|;..*tmpS|
|00002550| 74 72 20 3d 20 27 5c 30 | 27 3b 0d 09 63 32 70 73 |tr = '\0|';..c2ps|
|00002560| 74 72 28 6e 75 6d 53 74 | 72 29 3b 0d 09 53 74 72 |tr(numSt|r);..Str|
|00002570| 69 6e 67 54 6f 4e 75 6d | 28 28 53 74 72 69 6e 67 |ingToNum|((String|
|00002580| 50 74 72 29 6e 75 6d 53 | 74 72 2c 26 6e 75 6d 62 |Ptr)numS|tr,&numb|
|00002590| 65 72 29 3b 0d 09 70 32 | 63 73 74 72 28 6e 75 6d |er);..p2|cstr(num|
|000025a0| 53 74 72 29 3b 0d 09 0d | 09 69 66 20 28 69 6e 66 |Str);...|.if (inf|
|000025b0| 6f 2d 3e 70 61 72 65 6e | 74 47 72 6f 75 70 20 26 |o->paren|tGroup &|
|000025c0| 26 20 74 69 74 6c 65 5b | 30 5d 20 21 3d 20 27 c3 |& title[|0] != '.|
|000025d0| 27 29 20 7b 0d 09 09 6e | 61 6d 65 4c 65 6e 20 3d |') {...n|ameLen =|
|000025e0| 20 73 74 72 6c 65 6e 28 | 74 69 74 6c 65 29 2b 32 | strlen(|title)+2|
|000025f0| 3b 0d 09 09 2a 74 69 74 | 6c 65 20 3d 20 27 c3 27 |;...*tit|le = '.'|
|00002600| 3b 0d 09 09 4c 53 65 74 | 43 65 6c 6c 28 74 69 74 |;...LSet|Cell(tit|
|00002610| 6c 65 2c 6e 61 6d 65 4c | 65 6e 2c 74 68 65 43 65 |le,nameL|en,theCe|
|00002620| 6c 6c 2c 28 4c 69 73 74 | 48 61 6e 64 6c 65 29 69 |ll,(List|Handle)i|
|00002630| 6e 66 6f 2d 3e 64 61 74 | 61 29 3b 0d 09 09 66 6f |nfo->dat|a);...fo|
|00002640| 72 20 28 69 3d 30 3b 20 | 69 3c 69 6e 66 6f 2d 3e |r (i=0; |i<info->|
|00002650| 6e 75 6d 53 75 62 6a 65 | 63 74 73 20 26 26 20 28 |numSubje|cts && (|
|00002660| 28 54 53 75 62 6a 65 63 | 74 20 2a 29 2a 28 28 48 |(TSubjec|t *)*((H|
|00002670| 61 6e 64 6c 65 29 69 6e | 66 6f 2d 3e 64 61 74 61 |andle)in|fo->data|
|00002680| 32 29 29 5b 69 5d 2e 6e | 75 6d 62 65 72 20 21 3d |2))[i].n|umber !=|
|00002690| 20 6e 75 6d 62 65 72 3b | 20 69 2b 2b 29 0d 09 09 | number;| i++)...|
|000026a0| 09 3b 0d 09 09 69 66 20 | 28 69 3c 3d 69 6e 66 6f |.;...if |(i<=info|
|000026b0| 2d 3e 6e 75 6d 53 75 62 | 6a 65 63 74 73 29 0d 09 |->numSub|jects)..|
|000026c0| 09 09 28 28 54 53 75 62 | 6a 65 63 74 20 2a 29 2a |..((TSub|ject *)*|
|000026d0| 28 28 48 61 6e 64 6c 65 | 29 69 6e 66 6f 2d 3e 64 |((Handle|)info->d|
|000026e0| 61 74 61 32 29 29 5b 69 | 5d 2e 72 65 61 64 20 3d |ata2))[i|].read =|
|000026f0| 20 74 72 75 65 3b 0d 09 | 09 65 6c 73 65 0d 09 09 | true;..|.else...|
|00002700| 09 53 79 73 42 65 65 70 | 28 31 29 3b 0d 09 7d 0d |.SysBeep|(1);..}.|
|00002710| 09 4f 70 65 6e 41 72 74 | 69 63 6c 65 28 6e 65 77 |.OpenArt|icle(new|
|00002720| 73 47 72 6f 75 70 2c 6e | 75 6d 53 74 72 2c 74 69 |sGroup,n|umStr,ti|
|00002730| 74 6c 65 2c 77 69 6e 64 | 2c 63 4d 65 73 73 61 67 |tle,wind|,cMessag|
|00002740| 65 29 3b 0d 09 0d 09 69 | 66 20 28 69 6e 66 6f 2d |e);....i|f (info-|
|00002750| 3e 70 61 72 65 6e 74 47 | 72 6f 75 70 20 26 26 20 |>parentG|roup && |
|00002760| 69 6e 66 6f 2d 3e 70 61 | 72 65 6e 74 57 69 6e 64 |info->pa|rentWind|
|00002770| 6f 77 29 20 7b 0d 09 09 | 69 6e 66 6f 20 3d 20 28 |ow) {...|info = (|
|00002780| 54 77 69 6e 64 6f 77 49 | 6e 66 6f 20 2a 29 47 65 |TwindowI|nfo *)Ge|
|00002790| 74 57 52 65 66 43 6f 6e | 28 69 6e 66 6f 2d 3e 70 |tWRefCon|(info->p|
|000027a0| 61 72 65 6e 74 57 69 6e | 64 6f 77 29 3b 0d 09 09 |arentWin|dow);...|
|000027b0| 61 72 74 69 63 6c 65 49 | 6e 66 6f 20 3d 20 28 54 |articleI|nfo = (T|
|000027c0| 77 69 6e 64 6f 77 49 6e | 66 6f 20 2a 29 47 65 74 |windowIn|fo *)Get|
|000027d0| 57 52 65 66 43 6f 6e 28 | 46 72 6f 6e 74 57 69 6e |WRefCon(|FrontWin|
|000027e0| 64 6f 77 28 29 29 3b 0d | 09 09 4d 61 72 6b 58 72 |dow());.|..MarkXr|
|000027f0| 65 66 73 52 65 61 64 28 | 28 54 45 48 61 6e 64 6c |efsRead(|(TEHandl|
|00002800| 65 29 61 72 74 69 63 6c | 65 49 6e 66 6f 2d 3e 64 |e)articl|eInfo->d|
|00002810| 61 74 61 2c 28 54 47 72 | 6f 75 70 20 2a 29 69 6e |ata,(TGr|oup *)in|
|00002820| 66 6f 2d 3e 64 61 74 61 | 32 29 3b 0d 09 7d 0d 7d |fo->data|2);..}.}|
|00002830| 0d 0d 0d 2f 2a 09 4f 70 | 65 6e 52 65 66 65 72 65 |.../*.Op|enRefere|
|00002840| 6e 63 65 73 20 6f 70 65 | 6e 73 20 75 70 20 61 6c |nces ope|ns up al|
|00002850| 6c 20 61 72 74 69 63 6c | 65 73 20 77 68 69 63 68 |l articl|es which|
|00002860| 20 61 72 65 20 72 65 66 | 65 72 72 65 64 20 74 6f | are ref|erred to|
|00002870| 20 69 6e 0d 09 74 68 65 | 20 61 72 74 69 63 6c 65 | in..the| article|
|00002880| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 20 74 68 | contain|ed in th|
|00002890| 65 20 66 72 6f 6e 74 6d | 6f 73 74 20 77 69 6e 64 |e frontm|ost wind|
|000028a0| 6f 77 2e 20 20 54 68 65 | 20 22 52 65 66 65 72 65 |ow. The| "Refere|
|000028b0| 6e 63 65 73 3a 22 0d 09 | 66 69 65 6c 64 20 69 73 |nces:"..|field is|
|000028c0| 20 75 73 65 64 20 74 6f | 20 64 65 74 65 72 6d 69 | used to| determi|
|000028d0| 6e 65 20 77 68 69 63 68 | 20 61 72 74 69 63 6c 65 |ne which| article|
|000028e0| 73 20 73 68 6f 75 6c 64 | 20 62 65 20 66 65 74 63 |s should| be fetc|
|000028f0| 68 65 64 2e 0d 2a 2f 0d | 0d 76 6f 69 64 20 4f 70 |hed..*/.|.void Op|
|00002900| 65 6e 52 65 66 65 72 65 | 6e 63 65 73 28 76 6f 69 |enRefere|nces(voi|
|00002910| 64 29 0d 7b 0d 09 54 77 | 69 6e 64 6f 77 49 6e 66 |d).{..Tw|indowInf|
|00002920| 6f 20 2a 69 6e 66 6f 3b | 0d 09 48 61 6e 64 6c 65 |o *info;|..Handle|
|00002930| 20 74 68 65 54 65 78 74 | 3b 0d 09 6c 6f 6e 67 20 | theText|;..long |
|00002940| 72 65 66 4f 66 66 73 65 | 74 2c 65 6e 64 48 65 61 |refOffse|t,endHea|
|00002950| 64 65 72 2c 73 74 61 72 | 74 52 65 66 65 72 65 6e |der,star|tReferen|
|00002960| 63 65 2c 65 6e 64 52 65 | 66 65 72 65 6e 63 65 3b |ce,endRe|ference;|
|00002970| 0d 09 63 68 61 72 20 74 | 69 74 6c 65 5b 32 35 36 |..char t|itle[256|
|00002980| 5d 3b 0d 09 63 68 61 72 | 20 6d 75 6e 67 65 54 65 |];..char| mungeTe|
|00002990| 78 74 31 5b 32 35 36 5d | 3b 0d 09 63 68 61 72 20 |xt1[256]|;..char |
|000029a0| 6d 75 6e 67 65 54 65 78 | 74 32 5b 32 35 36 5d 3b |mungeTex|t2[256];|
|000029b0| 0d 09 0d 09 69 66 20 28 | 21 46 72 6f 6e 74 57 69 |....if (|!FrontWi|
|000029c0| 6e 64 6f 77 28 29 29 20 | 7b 0d 09 09 53 79 73 42 |ndow()) |{...SysB|
|000029d0| 65 65 70 28 31 29 3b 0d | 09 09 72 65 74 75 72 6e |eep(1);.|..return|
|000029e0| 3b 0d 09 7d 0d 09 09 0d | 09 73 74 72 63 70 79 28 |;..}....|.strcpy(|
|000029f0| 6d 75 6e 67 65 54 65 78 | 74 31 2c 43 52 53 54 52 |mungeTex|t1,CRSTR|
|00002a00| 29 3b 0d 09 73 74 72 63 | 61 74 28 6d 75 6e 67 65 |);..strc|at(munge|
|00002a10| 54 65 78 74 31 2c 22 52 | 65 66 65 72 65 6e 63 65 |Text1,"R|eference|
|00002a20| 73 3a 22 29 3b 0d 09 73 | 74 72 63 70 79 28 6d 75 |s:");..s|trcpy(mu|
|00002a30| 6e 67 65 54 65 78 74 32 | 2c 43 52 53 54 52 29 3b |ngeText2|,CRSTR);|
|00002a40| 0d 09 73 74 72 63 61 74 | 28 6d 75 6e 67 65 54 65 |..strcat|(mungeTe|
|00002a50| 78 74 32 2c 43 52 53 54 | 52 29 3b 0d 0d 09 69 6e |xt2,CRST|R);...in|
|00002a60| 66 6f 20 3d 20 28 54 77 | 69 6e 64 6f 77 49 6e 66 |fo = (Tw|indowInf|
|00002a70| 6f 20 2a 29 47 65 74 57 | 52 65 66 43 6f 6e 28 46 |o *)GetW|RefCon(F|
|00002a80| 72 6f 6e 74 57 69 6e 64 | 6f 77 28 29 29 3b 0d 09 |rontWind|ow());..|
|00002a90| 69 66 20 28 69 6e 66 6f | 2d 3e 6b 69 6e 64 20 21 |if (info|->kind !|
|00002aa0| 3d 20 63 4d 65 73 73 61 | 67 65 29 0d 09 09 72 65 |= cMessa|ge)...re|
|00002ab0| 74 75 72 6e 3b 0d 09 74 | 68 65 54 65 78 74 20 3d |turn;..t|heText =|
|00002ac0| 20 28 48 61 6e 64 6c 65 | 29 20 54 45 47 65 74 54 | (Handle|) TEGetT|
|00002ad0| 65 78 74 28 28 54 45 48 | 61 6e 64 6c 65 29 69 6e |ext((TEH|andle)in|
|00002ae0| 66 6f 2d 3e 64 61 74 61 | 29 3b 0d 09 69 66 20 28 |fo->data|);..if (|
|00002af0| 28 72 65 66 4f 66 66 73 | 65 74 20 3d 20 4d 75 6e |(refOffs|et = Mun|
|00002b00| 67 65 72 28 74 68 65 54 | 65 78 74 2c 30 2c 6d 75 |ger(theT|ext,0,mu|
|00002b10| 6e 67 65 54 65 78 74 31 | 2c 31 32 4c 2c 6e 69 6c |ngeText1|,12L,nil|
|00002b20| 2c 30 4c 29 29 3e 3d 30 | 20 26 26 0d 09 09 20 72 |,0L))>=0| &&... r|
|00002b30| 65 66 4f 66 66 73 65 74 | 20 3c 20 28 65 6e 64 48 |efOffset| < (endH|
|00002b40| 65 61 64 65 72 20 3d 20 | 4d 75 6e 67 65 72 28 74 |eader = |Munger(t|
|00002b50| 68 65 54 65 78 74 2c 30 | 2c 6d 75 6e 67 65 54 65 |heText,0|,mungeTe|
|00002b60| 78 74 32 2c 32 4c 2c 6e | 69 6c 2c 30 4c 29 29 29 |xt2,2L,n|il,0L)))|
|00002b70| 20 7b 0d 09 09 20 09 64 | 6f 20 7b 0d 09 09 09 09 | {... .d|o {.....|
|00002b80| 73 74 61 72 74 52 65 66 | 65 72 65 6e 63 65 20 3d |startRef|erence =|
|00002b90| 20 4d 75 6e 67 65 72 28 | 74 68 65 54 65 78 74 2c | Munger(|theText,|
|00002ba0| 72 65 66 4f 66 66 73 65 | 74 2c 22 3c 22 2c 31 4c |refOffse|t,"<",1L|
|00002bb0| 2c 6e 69 6c 2c 30 4c 29 | 3b 0d 09 09 09 09 65 6e |,nil,0L)|;.....en|
|00002bc0| 64 52 65 66 65 72 65 6e | 63 65 20 3d 20 4d 75 6e |dReferen|ce = Mun|
|00002bd0| 67 65 72 28 74 68 65 54 | 65 78 74 2c 72 65 66 4f |ger(theT|ext,refO|
|00002be0| 66 66 73 65 74 2c 22 3e | 22 2c 31 4c 2c 6e 69 6c |ffset,">|",1L,nil|
|00002bf0| 2c 30 4c 29 3b 0d 09 09 | 09 09 69 66 20 28 73 74 |,0L);...|..if (st|
|00002c00| 61 72 74 52 65 66 65 72 | 65 6e 63 65 3e 3d 30 20 |artRefer|ence>=0 |
|00002c10| 26 26 20 65 6e 64 52 65 | 66 65 72 65 6e 63 65 3e |&& endRe|ference>|
|00002c20| 3d 30 20 26 26 20 65 6e | 64 52 65 66 65 72 65 6e |=0 && en|dReferen|
|00002c30| 63 65 3c 65 6e 64 48 65 | 61 64 65 72 29 20 7b 0d |ce<endHe|ader) {.|
|00002c40| 09 09 09 09 09 48 4c 6f | 63 6b 28 74 68 65 54 65 |.....HLo|ck(theTe|
|00002c50| 78 74 29 3b 0d 09 09 09 | 09 09 73 74 72 6e 63 70 |xt);....|..strncp|
|00002c60| 79 28 74 69 74 6c 65 2c | 28 63 68 61 72 20 2a 29 |y(title,|(char *)|
|00002c70| 28 28 2a 74 68 65 54 65 | 78 74 29 2b 73 74 61 72 |((*theTe|xt)+star|
|00002c80| 74 52 65 66 65 72 65 6e | 63 65 29 2c 65 6e 64 52 |tReferen|ce),endR|
|00002c90| 65 66 65 72 65 6e 63 65 | 2d 73 74 61 72 74 52 65 |eference|-startRe|
|00002ca0| 66 65 72 65 6e 63 65 2b | 31 29 3b 0d 09 09 09 09 |ference+|1);.....|
|00002cb0| 09 74 69 74 6c 65 5b 65 | 6e 64 52 65 66 65 72 65 |.title[e|ndRefere|
|00002cc0| 6e 63 65 2d 73 74 61 72 | 74 52 65 66 65 72 65 6e |nce-star|tReferen|
|00002cd0| 63 65 2b 31 5d 20 3d 20 | 27 5c 30 27 3b 0d 09 09 |ce+1] = |'\0';...|
|00002ce0| 09 09 09 48 55 6e 6c 6f | 63 6b 28 74 68 65 54 65 |...HUnlo|ck(theTe|
|00002cf0| 78 74 29 3b 0d 09 09 09 | 09 09 4f 70 65 6e 41 72 |xt);....|..OpenAr|
|00002d00| 74 69 63 6c 65 28 6e 69 | 6c 2c 74 69 74 6c 65 2c |ticle(ni|l,title,|
|00002d10| 74 69 74 6c 65 2c 6e 69 | 6c 2c 63 4d 69 73 63 4d |title,ni|l,cMiscM|
|00002d20| 65 73 73 61 67 65 29 3b | 0d 09 09 09 09 7d 0d 09 |essage);|.....}..|
|00002d30| 09 09 09 72 65 66 4f 66 | 66 73 65 74 20 3d 20 65 |...refOf|fset = e|
|00002d40| 6e 64 52 65 66 65 72 65 | 6e 63 65 2b 31 3b 0d 09 |ndRefere|nce+1;..|
|00002d50| 09 09 7d 20 77 68 69 6c | 65 20 28 73 74 61 72 74 |..} whil|e (start|
|00002d60| 52 65 66 65 72 65 6e 63 | 65 3e 3d 30 20 26 26 20 |Referenc|e>=0 && |
|00002d70| 65 6e 64 52 65 66 65 72 | 65 6e 63 65 3e 3d 30 20 |endRefer|ence>=0 |
|00002d80| 26 26 20 65 6e 64 52 65 | 66 65 72 65 6e 63 65 3c |&& endRe|ference<|
|00002d90| 65 6e 64 48 65 61 64 65 | 72 29 3b 0d 09 7d 0d 7d |endHeade|r);..}.}|
|00002da0| 0d 0d 0d 2f 2a 09 4f 70 | 65 6e 41 72 74 69 63 6c |.../*.Op|enArticl|
|00002db0| 65 20 67 65 74 73 20 74 | 68 65 20 74 65 78 74 20 |e gets t|he text |
|00002dc0| 6f 66 20 61 6e 20 61 72 | 74 69 63 6c 65 2c 20 67 |of an ar|ticle, g|
|00002dd0| 69 76 65 6e 20 74 68 65 | 20 6e 65 77 73 67 72 6f |iven the| newsgro|
|00002de0| 75 70 2c 0d 09 61 6e 64 | 20 61 72 74 69 63 6c 65 |up,..and| article|
|00002df0| 20 6e 75 6d 62 65 72 20 | 6f 72 20 6d 65 73 73 61 | number |or messa|
|00002e00| 67 65 2d 69 64 2e 20 20 | 54 68 65 20 61 72 74 69 |ge-id. |The arti|
|00002e10| 63 6c 65 20 69 73 20 66 | 65 74 63 68 65 64 0d 09 |cle is f|etched..|
|00002e20| 61 6e 64 20 70 6c 61 63 | 65 64 20 69 6e 20 61 20 |and plac|ed in a |
|00002e30| 6e 65 77 20 77 69 6e 64 | 6f 77 20 63 72 65 61 74 |new wind|ow creat|
|00002e40| 65 64 20 62 79 20 74 68 | 65 20 70 72 6f 63 65 64 |ed by th|e proced|
|00002e50| 75 72 65 20 63 61 6c 6c | 2e 0d 2a 2f 0d 0d 76 6f |ure call|..*/..vo|
|00002e60| 69 64 20 4f 70 65 6e 41 | 72 74 69 63 6c 65 28 63 |id OpenA|rticle(c|
|00002e70| 68 61 72 20 2a 6e 65 77 | 73 47 72 6f 75 70 2c 63 |har *new|sGroup,c|
|00002e80| 68 61 72 20 2a 6e 75 6d | 62 65 72 2c 63 68 61 72 |har *num|ber,char|
|00002e90| 20 2a 74 69 74 6c 65 2c | 57 69 6e 64 6f 77 50 74 | *title,|WindowPt|
|00002ea0| 72 20 70 61 72 65 6e 74 | 2c 73 68 6f 72 74 20 6b |r parent|,short k|
|00002eb0| 69 6e 64 29 0d 7b 0d 09 | 63 68 61 72 20 2a 74 65 |ind).{..|char *te|
|00002ec0| 78 74 3b 0d 09 6c 6f 6e | 67 20 6c 65 6e 67 74 68 |xt;..lon|g length|
|00002ed0| 3b 0d 09 57 69 6e 64 6f | 77 50 74 72 20 74 68 65 |;..Windo|wPtr the|
|00002ee0| 57 69 6e 64 6f 77 3b 0d | 09 54 77 69 6e 64 6f 77 |Window;.|.Twindow|
|00002ef0| 49 6e 66 6f 20 2a 6e 65 | 77 49 6e 66 6f 3b 0d 09 |Info *ne|wInfo;..|
|00002f00| 47 72 61 66 50 74 72 20 | 73 61 76 65 50 6f 72 74 |GrafPtr |savePort|
|00002f10| 3b 0d 09 54 45 48 61 6e | 64 6c 65 20 74 68 65 54 |;..TEHan|dle theT|
|00002f20| 45 3b 0d 09 50 6f 69 6e | 74 20 66 69 72 73 74 4f |E;..Poin|t firstO|
|00002f30| 66 66 73 65 74 3b 0d 09 | 65 78 74 65 72 6e 20 54 |ffset;..|extern T|
|00002f40| 50 72 65 66 52 65 63 20 | 67 50 72 65 66 73 3b 0d |PrefRec |gPrefs;.|
|00002f50| 09 0d 09 69 66 20 28 21 | 46 72 6f 6e 74 57 69 6e |...if (!|FrontWin|
|00002f60| 64 6f 77 28 29 29 20 7b | 0d 09 09 53 79 73 42 65 |dow()) {|...SysBe|
|00002f70| 65 70 28 31 29 3b 0d 09 | 09 72 65 74 75 72 6e 3b |ep(1);..|.return;|
|00002f80| 0d 09 7d 0d 0d 09 53 65 | 74 50 74 28 26 66 69 72 |..}...Se|tPt(&fir|
|00002f90| 73 74 4f 66 66 73 65 74 | 2c 30 2c 30 29 3b 0d 09 |stOffset|,0,0);..|
|00002fa0| 47 65 74 50 6f 72 74 28 | 26 73 61 76 65 50 6f 72 |GetPort(|&savePor|
|00002fb0| 74 29 3b 0d 09 09 0d 09 | 69 66 20 28 70 61 72 65 |t);.....|if (pare|
|00002fc0| 6e 74 20 3d 3d 20 6e 69 | 6c 29 0d 09 09 53 65 74 |nt == ni|l)...Set|
|00002fd0| 50 6f 72 74 28 46 72 6f | 6e 74 57 69 6e 64 6f 77 |Port(Fro|ntWindow|
|00002fe0| 28 29 29 3b 09 0d 09 65 | 6c 73 65 0d 09 09 53 65 |());...e|lse...Se|
|00002ff0| 74 50 6f 72 74 28 70 61 | 72 65 6e 74 29 3b 0d 09 |tPort(pa|rent);..|
|00003000| 4c 6f 63 61 6c 54 6f 47 | 6c 6f 62 61 6c 28 26 66 |LocalToG|lobal(&f|
|00003010| 69 72 73 74 4f 66 66 73 | 65 74 29 3b 0d 09 53 65 |irstOffs|et);..Se|
|00003020| 74 50 6f 72 74 28 73 61 | 76 65 50 6f 72 74 29 3b |tPort(sa|vePort);|
|00003030| 0d 0d 09 47 65 74 50 6f | 72 74 28 26 73 61 76 65 |...GetPo|rt(&save|
|00003040| 50 6f 72 74 29 3b 0d 09 | 74 68 65 57 69 6e 64 6f |Port);..|theWindo|
|00003050| 77 20 3d 20 4d 61 6b 65 | 4e 65 77 57 69 6e 64 6f |w = Make|NewWindo|
|00003060| 77 28 6b 69 6e 64 2c 74 | 72 75 65 2c 66 69 72 73 |w(kind,t|rue,firs|
|00003070| 74 4f 66 66 73 65 74 2c | 28 63 68 61 72 20 2a 29 |tOffset,|(char *)|
|00003080| 63 32 70 73 74 72 28 74 | 69 74 6c 65 29 29 3b 0d |c2pstr(t|itle));.|
|00003090| 09 70 32 63 73 74 72 28 | 74 69 74 6c 65 29 3b 0d |.p2cstr(|title);.|
|000030a0| 0d 09 6e 65 77 49 6e 66 | 6f 20 3d 20 28 54 77 69 |..newInf|o = (Twi|
|000030b0| 6e 64 6f 77 49 6e 66 6f | 20 2a 29 20 47 65 74 57 |ndowInfo| *) GetW|
|000030c0| 52 65 66 43 6f 6e 28 74 | 68 65 57 69 6e 64 6f 77 |RefCon(t|heWindow|
|000030d0| 29 3b 0d 09 6e 65 77 49 | 6e 66 6f 2d 3e 70 61 72 |);..newI|nfo->par|
|000030e0| 65 6e 74 57 69 6e 64 6f | 77 20 3d 20 70 61 72 65 |entWindo|w = pare|
|000030f0| 6e 74 3b 0d 09 6e 65 77 | 49 6e 66 6f 2d 3e 63 68 |nt;..new|Info->ch|
|00003100| 69 6c 64 4c 69 73 74 20 | 3d 20 6e 69 6c 3b 0d 09 |ildList |= nil;..|
|00003110| 53 65 74 50 6f 72 74 28 | 74 68 65 57 69 6e 64 6f |SetPort(|theWindo|
|00003120| 77 29 3b 0d 09 0d 09 74 | 68 65 54 45 20 3d 20 28 |w);....t|heTE = (|
|00003130| 54 45 48 61 6e 64 6c 65 | 29 28 28 54 77 69 6e 64 |TEHandle|)((Twind|
|00003140| 6f 77 49 6e 66 6f 20 2a | 29 47 65 74 57 52 65 66 |owInfo *|)GetWRef|
|00003150| 43 6f 6e 28 74 68 65 57 | 69 6e 64 6f 77 29 29 2d |Con(theW|indow))-|
|00003160| 3e 64 61 74 61 3b 0d 09 | 0d 09 69 66 20 28 47 65 |>data;..|..if (Ge|
|00003170| 74 41 72 74 69 63 6c 65 | 28 6e 65 77 73 47 72 6f |tArticle|(newsGro|
|00003180| 75 70 2c 6e 75 6d 62 65 | 72 2c 26 74 65 78 74 2c |up,numbe|r,&text,|
|00003190| 26 6c 65 6e 67 74 68 2c | 6b 4d 61 78 4c 65 6e 67 |&length,|kMaxLeng|
|000031a0| 74 68 29 20 3d 3d 20 6e | 6f 45 72 72 29 20 7b 0d |th) == n|oErr) {.|
|000031b0| 09 09 69 66 20 28 6c 65 | 6e 67 74 68 20 3e 20 33 |..if (le|ngth > 3|
|000031c0| 32 30 30 30 29 0d 09 09 | 09 6c 65 6e 67 74 68 20 |2000)...|.length |
|000031d0| 3d 20 33 32 30 30 30 3b | 0d 09 09 54 45 53 65 74 |= 32000;|...TESet|
|000031e0| 54 65 78 74 28 74 65 78 | 74 2c 6c 65 6e 67 74 68 |Text(tex|t,length|
|000031f0| 2c 74 68 65 54 45 29 3b | 0d 09 09 54 45 53 65 74 |,theTE);|...TESet|
|00003200| 53 65 6c 65 63 74 28 30 | 4c 2c 30 4c 2c 74 68 65 |Select(0|L,0L,the|
|00003210| 54 45 29 3b 0d 09 09 69 | 66 20 28 67 50 72 65 66 |TE);...i|f (gPref|
|00003220| 73 2e 6f 70 65 6e 57 69 | 6e 64 6f 77 73 5a 6f 6f |s.openWi|ndowsZoo|
|00003230| 6d 65 64 29 0d 09 09 09 | 44 6f 5a 6f 6f 6d 28 74 |med)....|DoZoom(t|
|00003240| 68 65 57 69 6e 64 6f 77 | 2c 69 6e 5a 6f 6f 6d 4f |heWindow|,inZoomO|
|00003250| 75 74 29 3b 0d 09 09 53 | 68 6f 77 57 69 6e 64 6f |ut);...S|howWindo|
|00003260| 77 28 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 09 09 |w(theWin|dow);...|
|00003270| 52 65 64 6f 43 6f 6e 74 | 72 6f 6c 73 28 74 68 65 |RedoCont|rols(the|
|00003280| 57 69 6e 64 6f 77 29 3b | 0d 09 09 46 69 78 54 65 |Window);|...FixTe|
|00003290| 78 74 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |xt(theWi|ndow);..|
|000032a0| 09 49 6e 76 61 6c 52 65 | 63 74 28 26 74 68 65 57 |.InvalRe|ct(&theW|
|000032b0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 29 |indow->p|ortRect)|
|000032c0| 3b 0d 09 7d 0d 09 65 6c | 73 65 0d 09 09 44 6f 43 |;..}..el|se...DoC|
|000032d0| 6c 6f 73 65 57 69 6e 64 | 6f 77 28 74 68 65 57 69 |loseWind|ow(theWi|
|000032e0| 6e 64 6f 77 29 3b 0d 09 | 0d 09 53 65 74 50 6f 72 |ndow);..|..SetPor|
|000032f0| 74 28 73 61 76 65 50 6f | 72 74 29 3b 0d 09 4d 79 |t(savePo|rt);..My|
|00003300| 44 69 73 70 6f 73 50 74 | 72 28 74 65 78 74 29 3b |DisposPt|r(text);|
|00003310| 0d 7d 0d 0d 0d 2f 2a 09 | 44 6f 53 65 6c 65 63 74 |.}.../*.|DoSelect|
|00003320| 41 6c 6c 20 69 73 20 63 | 61 6c 6c 65 64 20 69 6e |All is c|alled in|
|00003330| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 61 20 53 | respons|e to a S|
|00003340| 65 6c 65 63 74 2d 41 6c | 6c 20 6d 65 6e 75 20 63 |elect-Al|l menu c|
|00003350| 6f 6d 6d 61 6e 64 2e 0d | 09 49 66 20 69 6e 20 61 |ommand..|.If in a|
|00003360| 20 6c 69 73 74 20 6d 61 | 6e 61 67 65 72 20 77 69 | list ma|nager wi|
|00003370| 6e 64 6f 77 2c 20 61 6c | 6c 20 63 65 6c 6c 73 20 |ndow, al|l cells |
|00003380| 61 72 65 20 68 69 6c 69 | 74 65 64 2e 20 20 49 66 |are hili|ted. If|
|00003390| 20 69 6e 20 61 20 0d 09 | 74 65 78 74 65 64 69 74 | in a ..|textedit|
|000033a0| 20 77 69 6e 64 6f 77 2c | 20 74 68 65 20 65 6e 74 | window,| the ent|
|000033b0| 69 72 65 20 72 61 6e 67 | 65 20 6f 66 20 61 20 6d |ire rang|e of a m|
|000033c0| 65 73 73 61 67 65 20 69 | 73 20 68 69 6c 69 74 65 |essage i|s hilite|
|000033d0| 64 2e 0d 2a 2f 0d 0d 76 | 6f 69 64 20 44 6f 53 65 |d..*/..v|oid DoSe|
|000033e0| 6c 65 63 74 41 6c 6c 28 | 76 6f 69 64 29 0d 7b 0d |lectAll(|void).{.|
|000033f0| 09 54 77 69 6e 64 6f 77 | 49 6e 66 6f 20 2a 69 6e |.Twindow|Info *in|
|00003400| 66 6f 3b 0d 09 43 65 6c | 6c 20 74 68 65 43 65 6c |fo;..Cel|l theCel|
|00003410| 6c 3b 0d 09 4c 69 73 74 | 48 61 6e 64 6c 65 20 74 |l;..List|Handle t|
|00003420| 68 65 4c 69 73 74 3b 0d | 09 54 45 48 61 6e 64 6c |heList;.|.TEHandl|
|00003430| 65 20 74 68 65 54 45 3b | 0d 09 0d 09 69 66 20 28 |e theTE;|....if (|
|00003440| 21 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 29 20 |!FrontWi|ndow()) |
|00003450| 7b 0d 09 09 53 79 73 42 | 65 65 70 28 31 29 3b 0d |{...SysB|eep(1);.|
|00003460| 09 09 72 65 74 75 72 6e | 3b 0d 09 7d 0d 09 0d 09 |..return|;..}....|
|00003470| 69 6e 66 6f 20 3d 20 28 | 54 77 69 6e 64 6f 77 49 |info = (|TwindowI|
|00003480| 6e 66 6f 20 2a 29 47 65 | 74 57 52 65 66 43 6f 6e |nfo *)Ge|tWRefCon|
|00003490| 28 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 29 3b |(FrontWi|ndow());|
|000034a0| 0d 09 69 66 20 28 69 6e | 66 6f 2d 3e 6b 69 6e 64 |..if (in|fo->kind|
|000034b0| 20 3c 20 63 4d 65 73 73 | 61 67 65 29 20 7b 0d 09 | < cMess|age) {..|
|000034c0| 09 74 68 65 4c 69 73 74 | 20 3d 20 28 4c 69 73 74 |.theList| = (List|
|000034d0| 48 61 6e 64 6c 65 29 20 | 69 6e 66 6f 2d 3e 64 61 |Handle) |info->da|
|000034e0| 74 61 3b 0d 09 09 53 65 | 74 50 74 28 26 74 68 65 |ta;...Se|tPt(&the|
|000034f0| 43 65 6c 6c 2c 30 2c 30 | 29 3b 0d 09 09 64 6f 20 |Cell,0,0|);...do |
|00003500| 7b 0d 09 09 09 4c 53 65 | 74 53 65 6c 65 63 74 28 |{....LSe|tSelect(|
|00003510| 74 72 75 65 2c 74 68 65 | 43 65 6c 6c 2c 74 68 65 |true,the|Cell,the|
|00003520| 4c 69 73 74 29 3b 0d 09 | 09 7d 20 77 68 69 6c 65 |List);..|.} while|
|00003530| 20 28 4c 4e 65 78 74 43 | 65 6c 6c 28 66 61 6c 73 | (LNextC|ell(fals|
|00003540| 65 2c 74 72 75 65 2c 26 | 74 68 65 43 65 6c 6c 2c |e,true,&|theCell,|
|00003550| 74 68 65 4c 69 73 74 29 | 29 3b 0d 09 7d 0d 09 65 |theList)|);..}..e|
|00003560| 6c 73 65 20 7b 0d 09 09 | 74 68 65 54 45 20 3d 20 |lse {...|theTE = |
|00003570| 28 54 45 48 61 6e 64 6c | 65 29 20 69 6e 66 6f 2d |(TEHandl|e) info-|
|00003580| 3e 64 61 74 61 3b 0d 09 | 09 54 45 53 65 74 53 65 |>data;..|.TESetSe|
|00003590| 6c 65 63 74 28 30 4c 2c | 33 32 37 36 37 4c 2c 74 |lect(0L,|32767L,t|
|000035a0| 68 65 54 45 29 3b 0d 09 | 7d 0d 7d 0d 0d 0d 2f 2a |heTE);..|}.}.../*|
|000035b0| 09 44 6f 53 65 61 72 63 | 68 20 69 73 20 63 61 6c |.DoSearc|h is cal|
|000035c0| 6c 65 64 20 69 6e 20 72 | 65 73 70 6f 6e 73 65 20 |led in r|esponse |
|000035d0| 74 6f 20 61 20 73 65 61 | 72 63 68 20 6d 65 6e 75 |to a sea|rch menu|
|000035e0| 20 63 6f 6d 6d 61 6e 64 | 2e 0d 09 41 6c 6c 20 63 | command|...All c|
|000035f0| 75 72 72 65 6e 6c 79 20 | 73 65 6c 65 63 74 65 64 |urrenly |selected|
|00003600| 20 6e 65 77 73 67 72 6f | 75 70 73 20 61 72 65 20 | newsgro|ups are |
|00003610| 73 65 61 72 63 68 65 64 | 20 66 6f 72 20 61 20 74 |searched| for a t|
|00003620| 65 78 74 0d 09 73 74 72 | 69 6e 67 20 77 68 69 63 |ext..str|ing whic|
|00003630| 68 20 69 73 20 70 72 6f | 6d 70 74 65 64 20 66 6f |h is pro|mpted fo|
|00003640| 72 20 62 65 6c 6f 77 2e | 20 20 41 20 75 73 65 72 |r below.| A user|
|00003650| 20 67 72 6f 75 70 20 77 | 69 6e 64 6f 77 0d 09 69 | group w|indow..i|
|00003660| 73 20 63 72 65 61 74 65 | 64 20 63 6f 6e 74 61 69 |s create|d contai|
|00003670| 6e 69 6e 67 20 61 6e 20 | 65 6e 74 72 79 20 66 6f |ning an |entry fo|
|00003680| 72 20 65 61 63 68 20 6f | 66 20 74 68 65 20 73 65 |r each o|f the se|
|00003690| 6c 65 63 74 65 64 0d 09 | 67 72 6f 75 70 20 77 68 |lected..|group wh|
|000036a0| 69 63 68 20 6d 61 74 63 | 68 65 64 20 74 68 65 20 |ich matc|hed the |
|000036b0| 73 65 61 72 63 68 2c 20 | 61 6e 64 20 74 68 65 20 |search, |and the |
|000036c0| 61 72 74 69 63 6c 65 73 | 20 61 72 65 0d 09 70 6c |articles| are..pl|
|000036d0| 61 63 65 64 20 69 6e 20 | 74 68 65 73 65 20 67 72 |aced in |these gr|
|000036e0| 6f 75 70 73 2e 0d 2a 2f | 0d 0d 76 6f 69 64 20 44 |oups..*/|..void D|
|000036f0| 6f 53 65 61 72 63 68 28 | 76 6f 69 64 29 0d 7b 0d |oSearch(|void).{.|
|00003700| 09 54 77 69 6e 64 6f 77 | 49 6e 66 6f 20 2a 69 6e |.Twindow|Info *in|
|00003710| 66 6f 2c 2a 6e 65 77 49 | 6e 66 6f 3b 0d 09 4c 69 |fo,*newI|nfo;..Li|
|00003720| 73 74 48 61 6e 64 6c 65 | 20 74 68 65 4c 69 73 74 |stHandle| theList|
|00003730| 3b 0d 09 43 65 6c 6c 20 | 74 68 65 43 65 6c 6c 2c |;..Cell |theCell,|
|00003740| 6e 65 77 43 65 6c 6c 3b | 0d 09 63 68 61 72 20 63 |newCell;|..char c|
|00003750| 65 6c 6c 44 61 74 61 5b | 32 35 36 5d 2c 68 65 61 |ellData[|256],hea|
|00003760| 64 65 72 54 78 74 5b 32 | 35 36 5d 2c 73 65 61 72 |derTxt[2|56],sear|
|00003770| 63 68 54 78 74 5b 32 35 | 36 5d 3b 0d 09 73 68 6f |chTxt[25|6];..sho|
|00003780| 72 74 20 64 61 74 61 4c | 65 6e 3b 0d 09 54 47 72 |rt dataL|en;..TGr|
|00003790| 6f 75 70 20 2a 67 72 6f | 75 70 44 61 74 61 2c 2a |oup *gro|upData,*|
|000037a0| 70 72 65 76 47 72 6f 75 | 70 2c 2a 63 75 72 47 72 |prevGrou|p,*curGr|
|000037b0| 6f 75 70 3b 0d 09 44 69 | 61 6c 6f 67 50 74 72 20 |oup;..Di|alogPtr |
|000037c0| 74 68 65 44 6c 67 3b 0d | 09 73 68 6f 72 74 20 69 |theDlg;.|.short i|
|000037d0| 74 65 6d 3b 0d 09 57 69 | 6e 64 6f 77 50 74 72 20 |tem;..Wi|ndowPtr |
|000037e0| 73 65 61 72 63 68 57 69 | 6e 64 6f 77 3b 0d 09 73 |searchWi|ndow;..s|
|000037f0| 68 6f 72 74 20 69 54 79 | 70 65 3b 0d 09 48 61 6e |hort iTy|pe;..Han|
|00003800| 64 6c 65 20 69 48 6e 64 | 6c 3b 0d 09 52 65 63 74 |dle iHnd|l;..Rect|
|00003810| 20 69 52 65 63 74 3b 0d | 09 63 68 61 72 20 2a 63 | iRect;.|.char *c|
|00003820| 75 72 72 65 6e 74 3b 0d | 09 0d 09 69 66 20 28 21 |urrent;.|...if (!|
|00003830| 46 72 6f 6e 74 57 69 6e | 64 6f 77 28 29 29 20 7b |FrontWin|dow()) {|
|00003840| 0d 09 09 53 79 73 42 65 | 65 70 28 31 29 3b 0d 09 |...SysBe|ep(1);..|
|00003850| 09 72 65 74 75 72 6e 3b | 0d 09 7d 0d 09 0d 09 2f |.return;|..}..../|
|00003860| 2a 20 64 69 73 70 6c 61 | 79 20 64 69 61 6c 6f 67 |* displa|y dialog|
|00003870| 20 61 73 6b 69 6e 67 20 | 77 68 61 74 20 74 6f 20 | asking |what to |
|00003880| 73 65 61 72 63 68 20 66 | 6f 72 20 2a 2f 0d 09 09 |search f|or */...|
|00003890| 0d 09 74 68 65 44 6c 67 | 20 3d 20 47 65 74 4e 65 |..theDlg| = GetNe|
|000038a0| 77 44 69 61 6c 6f 67 28 | 6b 53 65 61 72 63 68 44 |wDialog(|kSearchD|
|000038b0| 6c 67 2c 6e 69 6c 2c 28 | 57 69 6e 64 6f 77 50 74 |lg,nil,(|WindowPt|
|000038c0| 72 29 2d 31 29 3b 0d 09 | 4f 75 74 6c 69 6e 65 4f |r)-1);..|OutlineO|
|000038d0| 4b 28 74 68 65 44 6c 67 | 29 3b 0d 09 0d 09 47 65 |K(theDlg|);....Ge|
|000038e0| 74 44 49 74 65 6d 28 74 | 68 65 44 6c 67 2c 35 2c |tDItem(t|heDlg,5,|
|000038f0| 26 69 54 79 70 65 2c 26 | 69 48 6e 64 6c 2c 26 69 |&iType,&|iHndl,&i|
|00003900| 52 65 63 74 29 3b 0d 09 | 53 65 74 44 49 74 65 6d |Rect);..|SetDItem|
|00003910| 28 74 68 65 44 6c 67 2c | 35 2c 69 54 79 70 65 2c |(theDlg,|5,iType,|
|00003920| 28 48 61 6e 64 6c 65 29 | 20 44 72 61 77 50 6f 70 |(Handle)| DrawPop|
|00003930| 55 70 2c 26 69 52 65 63 | 74 29 3b 0d 0d 09 64 6f |Up,&iRec|t);...do|
|00003940| 20 4d 6f 64 61 6c 44 69 | 61 6c 6f 67 28 50 6f 70 | ModalDi|alog(Pop|
|00003950| 55 70 46 69 6c 74 65 72 | 2c 26 69 74 65 6d 29 3b |UpFilter|,&item);|
|00003960| 0d 09 77 68 69 6c 65 20 | 28 69 74 65 6d 20 21 3d |..while |(item !=|
|00003970| 20 6f 6b 42 75 74 74 6f | 6e 20 26 26 20 69 74 65 | okButto|n && ite|
|00003980| 6d 20 21 3d 20 63 61 6e | 63 65 6c 42 75 74 74 6f |m != can|celButto|
|00003990| 6e 29 3b 0d 09 09 0d 09 | 47 65 74 44 49 74 65 6d |n);.....|GetDItem|
|000039a0| 28 74 68 65 44 6c 67 2c | 33 2c 26 69 54 79 70 65 |(theDlg,|3,&iType|
|000039b0| 2c 26 69 48 6e 64 6c 2c | 26 69 52 65 63 74 29 3b |,&iHndl,|&iRect);|
|000039c0| 0d 09 47 65 74 49 54 65 | 78 74 28 69 48 6e 64 6c |..GetITe|xt(iHndl|
|000039d0| 2c 68 65 61 64 65 72 54 | 78 74 29 3b 0d 09 70 32 |,headerT|xt);..p2|
|000039e0| 63 73 74 72 28 68 65 61 | 64 65 72 54 78 74 29 3b |cstr(hea|derTxt);|
|000039f0| 0d 09 47 65 74 44 49 74 | 65 6d 28 74 68 65 44 6c |..GetDIt|em(theDl|
|00003a00| 67 2c 34 2c 26 69 54 79 | 70 65 2c 26 69 48 6e 64 |g,4,&iTy|pe,&iHnd|
|00003a10| 6c 2c 26 69 52 65 63 74 | 29 3b 0d 09 47 65 74 49 |l,&iRect|);..GetI|
|00003a20| 54 65 78 74 28 69 48 6e | 64 6c 2c 73 65 61 72 63 |Text(iHn|dl,searc|
|00003a30| 68 54 78 74 29 3b 0d 09 | 70 32 63 73 74 72 28 73 |hTxt);..|p2cstr(s|
|00003a40| 65 61 72 63 68 54 78 74 | 29 3b 0d 09 0d 09 66 6f |earchTxt|);....fo|
|00003a50| 72 20 28 63 75 72 72 65 | 6e 74 20 3d 20 73 65 61 |r (curre|nt = sea|
|00003a60| 72 63 68 54 78 74 3b 20 | 2a 63 75 72 72 65 6e 74 |rchTxt; |*current|
|00003a70| 20 21 3d 20 27 5c 30 27 | 3b 20 63 75 72 72 65 6e | != '\0'|; curren|
|00003a80| 74 2b 2b 29 0d 09 09 2a | 63 75 72 72 65 6e 74 20 |t++)...*|current |
|00003a90| 3d 20 74 6f 75 70 70 65 | 72 28 2a 63 75 72 72 65 |= touppe|r(*curre|
|00003aa0| 6e 74 29 3b 0d 0d 09 44 | 69 73 70 6f 73 44 69 61 |nt);...D|isposDia|
|00003ab0| 6c 6f 67 28 74 68 65 44 | 6c 67 29 3b 0d 09 0d 09 |log(theD|lg);....|
|00003ac0| 69 66 20 28 69 74 65 6d | 3d 3d 63 61 6e 63 65 6c |if (item|==cancel|
|00003ad0| 42 75 74 74 6f 6e 20 7c | 7c 20 2a 68 65 61 64 65 |Button ||| *heade|
|00003ae0| 72 54 78 74 3d 3d 27 5c | 30 27 20 7c 7c 20 2a 73 |rTxt=='\|0' || *s|
|00003af0| 65 61 72 63 68 54 78 74 | 3d 3d 27 5c 30 27 29 0d |earchTxt|=='\0').|
|00003b00| 09 09 72 65 74 75 72 6e | 3b 0d 0d 09 69 6e 66 6f |..return|;...info|
|00003b10| 20 3d 20 28 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 | = (Twin|dowInfo |
|00003b20| 2a 29 20 47 65 74 57 52 | 65 66 43 6f 6e 28 46 72 |*) GetWR|efCon(Fr|
|00003b30| 6f 6e 74 57 69 6e 64 6f | 77 28 29 29 3b 0d 09 74 |ontWindo|w());..t|
|00003b40| 68 65 4c 69 73 74 20 3d | 20 28 4c 69 73 74 48 61 |heList =| (ListHa|
|00003b50| 6e 64 6c 65 29 20 69 6e | 66 6f 2d 3e 64 61 74 61 |ndle) in|fo->data|
|00003b60| 3b 0d 09 73 65 61 72 63 | 68 57 69 6e 64 6f 77 20 |;..searc|hWindow |
|00003b70| 3d 20 4e 65 77 47 72 6f | 75 70 57 69 6e 64 6f 77 |= NewGro|upWindow|
|00003b80| 28 22 5c 70 53 65 61 72 | 63 68 20 47 72 6f 75 70 |("\pSear|ch Group|
|00003b90| 73 22 29 3b 0d 09 6e 65 | 77 49 6e 66 6f 20 3d 20 |s");..ne|wInfo = |
|00003ba0| 28 54 77 69 6e 64 6f 77 | 49 6e 66 6f 20 2a 29 20 |(Twindow|Info *) |
|00003bb0| 47 65 74 57 52 65 66 43 | 6f 6e 28 73 65 61 72 63 |GetWRefC|on(searc|
|00003bc0| 68 57 69 6e 64 6f 77 29 | 3b 0d 09 6e 65 77 49 6e |hWindow)|;..newIn|
|00003bd0| 66 6f 2d 3e 63 68 61 6e | 67 65 64 20 3d 20 66 61 |fo->chan|ged = fa|
|00003be0| 6c 73 65 3b 0d 09 6e 65 | 77 49 6e 66 6f 2d 3e 64 |lse;..ne|wInfo->d|
|00003bf0| 69 73 6b 46 69 6c 65 5b | 30 5d 20 3d 20 27 5c 30 |iskFile[|0] = '\0|
|00003c00| 27 3b 0d 09 0d 09 53 65 | 74 50 74 28 26 74 68 65 |';....Se|tPt(&the|
|00003c10| 43 65 6c 6c 2c 30 2c 30 | 29 3b 0d 09 0d 09 77 68 |Cell,0,0|);....wh|
|00003c20| 69 6c 65 20 28 4c 47 65 | 74 53 65 6c 65 63 74 28 |ile (LGe|tSelect(|
|00003c30| 74 72 75 65 2c 26 74 68 | 65 43 65 6c 6c 2c 74 68 |true,&th|eCell,th|
|00003c40| 65 4c 69 73 74 29 29 20 | 7b 0d 09 09 64 61 74 61 |eList)) |{...data|
|00003c50| 4c 65 6e 20 3d 20 32 35 | 36 3b 0d 09 09 4c 47 65 |Len = 25|6;...LGe|
|00003c60| 74 43 65 6c 6c 28 63 65 | 6c 6c 44 61 74 61 2c 26 |tCell(ce|llData,&|
|00003c70| 64 61 74 61 4c 65 6e 2c | 74 68 65 43 65 6c 6c 2c |dataLen,|theCell,|
|00003c80| 74 68 65 4c 69 73 74 29 | 3b 0d 09 09 69 66 20 28 |theList)|;...if (|
|00003c90| 46 69 6e 64 47 72 6f 75 | 70 28 69 6e 66 6f 2c 63 |FindGrou|p(info,c|
|00003ca0| 65 6c 6c 44 61 74 61 2c | 26 67 72 6f 75 70 44 61 |ellData,|&groupDa|
|00003cb0| 74 61 29 29 20 7b 0d 09 | 09 09 67 72 6f 75 70 44 |ta)) {..|..groupD|
|00003cc0| 61 74 61 20 3d 20 53 75 | 62 73 63 72 69 62 65 28 |ata = Su|bscribe(|
|00003cd0| 67 72 6f 75 70 44 61 74 | 61 2c 73 65 61 72 63 68 |groupDat|a,search|
|00003ce0| 57 69 6e 64 6f 77 2c 26 | 6e 65 77 43 65 6c 6c 29 |Window,&|newCell)|
|00003cf0| 3b 0d 09 09 09 69 66 20 | 28 67 72 6f 75 70 44 61 |;....if |(groupDa|
|00003d00| 74 61 20 26 26 20 67 72 | 6f 75 70 44 61 74 61 2d |ta && gr|oupData-|
|00003d10| 3e 72 65 61 64 29 20 7b | 0d 09 09 09 09 4d 79 44 |>read) {|.....MyD|
|00003d20| 69 73 70 6f 73 50 74 72 | 28 28 50 74 72 29 67 72 |isposPtr|((Ptr)gr|
|00003d30| 6f 75 70 44 61 74 61 2d | 3e 72 65 61 64 29 3b 0d |oupData-|>read);.|
|00003d40| 09 09 09 09 67 72 6f 75 | 70 44 61 74 61 2d 3e 72 |....grou|pData->r|
|00003d50| 65 61 64 20 3d 20 6e 69 | 6c 3b 0d 09 09 09 09 69 |ead = ni|l;.....i|
|00003d60| 66 20 28 21 53 65 61 72 | 63 68 41 64 64 28 68 65 |f (!Sear|chAdd(he|
|00003d70| 61 64 65 72 54 78 74 2c | 73 65 61 72 63 68 54 78 |aderTxt,|searchTx|
|00003d80| 74 2c 67 72 6f 75 70 44 | 61 74 61 29 29 20 7b 0d |t,groupD|ata)) {.|
|00003d90| 09 09 09 09 09 4c 44 65 | 6c 52 6f 77 28 31 2c 6e |.....LDe|lRow(1,n|
|00003da0| 65 77 43 65 6c 6c 2e 76 | 2c 28 4c 69 73 74 48 61 |ewCell.v|,(ListHa|
|00003db0| 6e 64 6c 65 29 6e 65 77 | 49 6e 66 6f 2d 3e 64 61 |ndle)new|Info->da|
|00003dc0| 74 61 29 3b 0d 09 09 09 | 09 09 66 6f 72 20 28 63 |ta);....|..for (c|
|00003dd0| 75 72 47 72 6f 75 70 20 | 3d 20 70 72 65 76 47 72 |urGroup |= prevGr|
|00003de0| 6f 75 70 20 3d 20 28 54 | 47 72 6f 75 70 20 2a 29 |oup = (T|Group *)|
|00003df0| 6e 65 77 49 6e 66 6f 2d | 3e 64 61 74 61 32 3b 0d |newInfo-|>data2;.|
|00003e00| 09 09 09 09 09 09 63 75 | 72 47 72 6f 75 70 20 26 |......cu|rGroup &|
|00003e10| 26 20 63 75 72 47 72 6f | 75 70 21 3d 67 72 6f 75 |& curGro|up!=grou|
|00003e20| 70 44 61 74 61 3b 0d 09 | 09 09 09 09 09 70 72 65 |pData;..|.....pre|
|00003e30| 76 47 72 6f 75 70 20 3d | 20 63 75 72 47 72 6f 75 |vGroup =| curGrou|
|00003e40| 70 2c 20 63 75 72 47 72 | 6f 75 70 20 3d 20 63 75 |p, curGr|oup = cu|
|00003e50| 72 47 72 6f 75 70 2d 3e | 6e 65 78 74 29 0d 09 09 |rGroup->|next)...|
|00003e60| 09 09 09 09 3b 0d 09 09 | 09 09 09 69 66 20 28 63 |....;...|...if (c|
|00003e70| 75 72 47 72 6f 75 70 20 | 3d 3d 20 6e 69 6c 29 20 |urGroup |== nil) |
|00003e80| 7b 0d 09 09 09 09 09 09 | 53 79 73 42 65 65 70 28 |{.......|SysBeep(|
|00003e90| 31 29 3b 0d 09 09 09 09 | 09 09 72 65 74 75 72 6e |1);.....|..return|
|00003ea0| 3b 0d 09 09 09 09 09 7d | 0d 09 09 09 09 09 70 72 |;......}|......pr|
|00003eb0| 65 76 47 72 6f 75 70 2d | 3e 6e 65 78 74 20 3d 20 |evGroup-|>next = |
|00003ec0| 6e 69 6c 3b 0d 09 09 09 | 09 09 69 66 20 28 70 72 |nil;....|..if (pr|
|00003ed0| 65 76 47 72 6f 75 70 20 | 3d 3d 20 63 75 72 47 72 |evGroup |== curGr|
|00003ee0| 6f 75 70 29 0d 09 09 09 | 09 09 09 6e 65 77 49 6e |oup)....|...newIn|
|00003ef0| 66 6f 2d 3e 64 61 74 61 | 32 20 3d 20 6e 69 6c 3b |fo->data|2 = nil;|
|00003f00| 0d 09 09 09 09 09 4d 79 | 44 69 73 70 6f 73 50 74 |......My|DisposPt|
|00003f10| 72 28 28 50 74 72 29 67 | 72 6f 75 70 44 61 74 61 |r((Ptr)g|roupData|
|00003f20| 29 3b 0d 09 09 09 09 7d | 0d 09 09 09 7d 0d 09 09 |);.....}|....}...|
|00003f30| 74 68 65 43 65 6c 6c 2e | 76 2b 2b 3b 0d 09 09 7d |theCell.|v++;...}|
|00003f40| 0d 09 7d 0d 7d 0d 0d 0d | 2f 2a 09 44 72 61 77 50 |..}.}...|/*.DrawP|
|00003f50| 6f 70 55 70 20 69 73 20 | 74 68 65 20 75 73 65 72 |opUp is |the user|
|00003f60| 69 74 65 6d 20 70 72 6f | 63 65 64 75 72 65 20 74 |item pro|cedure t|
|00003f70| 6f 20 64 72 61 77 20 61 | 20 70 6f 70 2d 75 70 20 |o draw a| pop-up |
|00003f80| 6d 65 6e 75 2e 0d 09 54 | 68 69 73 20 72 6f 75 74 |menu...T|his rout|
|00003f90| 69 6e 65 20 69 73 20 63 | 61 6c 6c 65 64 20 69 6e |ine is c|alled in|
|00003fa0| 20 72 65 73 70 6f 6e 73 | 65 20 74 6f 20 75 70 64 | respons|e to upd|
|00003fb0| 61 74 65 20 65 76 65 6e | 74 73 20 66 6f 72 20 74 |ate even|ts for t|
|00003fc0| 68 65 0d 09 70 6f 70 2d | 75 70 20 6d 65 6e 75 20 |he..pop-|up menu |
|00003fd0| 61 72 65 61 2e 0d 2a 2f | 0d 0d 70 61 73 63 61 6c |area..*/|..pascal|
|00003fe0| 20 76 6f 69 64 20 44 72 | 61 77 50 6f 70 55 70 28 | void Dr|awPopUp(|
|00003ff0| 44 69 61 6c 6f 67 50 74 | 72 20 74 68 65 44 6c 67 |DialogPt|r theDlg|
|00004000| 2c 73 68 6f 72 74 20 74 | 68 65 49 74 65 6d 29 0d |,short t|heItem).|
|00004010| 7b 0d 23 70 72 61 67 6d | 61 20 75 6e 75 73 65 64 |{.#pragm|a unused|
|00004020| 20 28 74 68 65 49 74 65 | 6d 29 0d 09 52 65 63 74 | (theIte|m)..Rect|
|00004030| 20 69 52 65 63 74 3b 0d | 09 73 68 6f 72 74 20 69 | iRect;.|.short i|
|00004040| 54 79 70 65 3b 0d 09 48 | 61 6e 64 6c 65 20 69 48 |Type;..H|andle iH|
|00004050| 6e 64 6c 3b 0d 09 0d 09 | 47 65 74 44 49 74 65 6d |ndl;....|GetDItem|
|00004060| 28 74 68 65 44 6c 67 2c | 35 2c 26 69 54 79 70 65 |(theDlg,|5,&iType|
|00004070| 2c 26 69 48 6e 64 6c 2c | 26 69 52 65 63 74 29 3b |,&iHndl,|&iRect);|
|00004080| 0d 09 0d 09 2f 2a 20 64 | 72 61 77 20 74 68 65 20 |..../* d|raw the |
|00004090| 62 6f 78 20 61 6e 64 20 | 73 68 61 64 6f 77 20 2a |box and |shadow *|
|000040a0| 2f 0d 09 0d 09 46 72 61 | 6d 65 52 65 63 74 28 26 |/....Fra|meRect(&|
|000040b0| 69 52 65 63 74 29 3b 0d | 09 4d 6f 76 65 54 6f 28 |iRect);.|.MoveTo(|
|000040c0| 69 52 65 63 74 2e 72 69 | 67 68 74 2c 69 52 65 63 |iRect.ri|ght,iRec|
|000040d0| 74 2e 74 6f 70 2b 32 29 | 3b 0d 09 4c 69 6e 65 54 |t.top+2)|;..LineT|
|000040e0| 6f 28 69 52 65 63 74 2e | 72 69 67 68 74 2c 69 52 |o(iRect.|right,iR|
|000040f0| 65 63 74 2e 62 6f 74 74 | 6f 6d 29 3b 0d 09 4c 69 |ect.bott|om);..Li|
|00004100| 6e 65 54 6f 28 69 52 65 | 63 74 2e 6c 65 66 74 2b |neTo(iRe|ct.left+|
|00004110| 32 2c 69 52 65 63 74 2e | 62 6f 74 74 6f 6d 29 3b |2,iRect.|bottom);|
|00004120| 0d 09 0d 09 2f 2a 20 64 | 72 61 77 20 74 68 65 20 |..../* d|raw the |
|00004130| 64 6f 77 6e 77 61 72 64 | 20 74 72 69 61 6e 67 6c |downward| triangl|
|00004140| 65 20 2a 2f 0d 09 0d 09 | 4d 6f 76 65 54 6f 28 28 |e */....|MoveTo((|
|00004150| 28 69 52 65 63 74 2e 6c | 65 66 74 2b 69 52 65 63 |(iRect.l|eft+iRec|
|00004160| 74 2e 72 69 67 68 74 29 | 2f 32 29 2d 35 2c 28 28 |t.right)|/2)-5,((|
|00004170| 69 52 65 63 74 2e 74 6f | 70 2b 69 52 65 63 74 2e |iRect.to|p+iRect.|
|00004180| 62 6f 74 74 6f 6d 29 2f | 32 29 2d 33 29 3b 0d 09 |bottom)/|2)-3);..|
|00004190| 4c 69 6e 65 28 38 2c 30 | 29 3b 0d 09 4d 6f 76 65 |Line(8,0|);..Move|
|000041a0| 28 2d 31 2c 31 29 3b 0d | 09 4c 69 6e 65 28 2d 36 |(-1,1);.|.Line(-6|
|000041b0| 2c 30 29 3b 0d 09 4d 6f | 76 65 28 31 2c 31 29 3b |,0);..Mo|ve(1,1);|
|000041c0| 0d 09 4c 69 6e 65 28 34 | 2c 30 29 3b 0d 09 4d 6f |..Line(4|,0);..Mo|
|000041d0| 76 65 28 2d 31 2c 31 29 | 3b 0d 09 4c 69 6e 65 28 |ve(-1,1)|;..Line(|
|000041e0| 2d 32 2c 30 29 3b 0d 09 | 4d 6f 76 65 28 31 2c 31 |-2,0);..|Move(1,1|
|000041f0| 29 3b 0d 09 4c 69 6e 65 | 28 30 2c 30 29 3b 0d 7d |);..Line|(0,0);.}|
|00004200| 0d 0d 0d 2f 2a 09 54 68 | 69 73 20 72 6f 75 74 69 |.../*.Th|is routi|
|00004210| 6e 65 20 69 73 20 74 68 | 65 20 64 69 61 6c 6f 67 |ne is th|e dialog|
|00004220| 20 66 69 6c 74 65 72 20 | 66 6f 72 20 74 68 65 20 | filter |for the |
|00004230| 64 69 61 6c 6f 67 20 62 | 6f 78 20 63 6f 6e 74 61 |dialog b|ox conta|
|00004240| 69 6e 69 6e 67 0d 09 61 | 20 70 6f 70 2d 75 70 20 |ining..a| pop-up |
|00004250| 6d 65 6e 75 2e 0d 2a 2f | 0d 0d 70 61 73 63 61 6c |menu..*/|..pascal|
|00004260| 20 42 6f 6f 6c 65 61 6e | 20 50 6f 70 55 70 46 69 | Boolean| PopUpFi|
|00004270| 6c 74 65 72 28 44 69 61 | 6c 6f 67 50 74 72 20 74 |lter(Dia|logPtr t|
|00004280| 68 65 44 6c 67 2c 45 76 | 65 6e 74 52 65 63 6f 72 |heDlg,Ev|entRecor|
|00004290| 64 20 2a 65 76 2c 73 68 | 6f 72 74 20 2a 69 74 65 |d *ev,sh|ort *ite|
|000042a0| 6d 29 0d 7b 0d 09 63 68 | 61 72 20 6b 65 79 50 72 |m).{..ch|ar keyPr|
|000042b0| 65 73 73 65 64 3b 0d 09 | 50 6f 69 6e 74 20 64 6f |essed;..|Point do|
|000042c0| 77 6e 4c 6f 63 3b 0d 09 | 4d 65 6e 75 48 61 6e 64 |wnLoc;..|MenuHand|
|000042d0| 6c 65 20 70 6f 70 4d 65 | 6e 75 3b 0d 09 73 68 6f |le popMe|nu;..sho|
|000042e0| 72 74 20 69 54 79 70 65 | 3b 0d 09 48 61 6e 64 6c |rt iType|;..Handl|
|000042f0| 65 20 69 48 6e 64 6c 3b | 0d 09 52 65 63 74 20 69 |e iHndl;|..Rect i|
|00004300| 52 65 63 74 3b 0d 09 6c | 6f 6e 67 20 63 68 6f 73 |Rect;..l|ong chos|
|00004310| 65 6e 3b 0d 09 73 68 6f | 72 74 20 63 68 6f 69 63 |en;..sho|rt choic|
|00004320| 65 3b 0d 09 53 74 72 32 | 35 35 20 69 53 74 72 69 |e;..Str2|55 iStri|
|00004330| 6e 67 3b 0d 09 0d 09 2a | 69 74 65 6d 20 3d 20 30 |ng;....*|item = 0|
|00004340| 3b 0d 09 73 77 69 74 63 | 68 20 28 65 76 2d 3e 77 |;..switc|h (ev->w|
|00004350| 68 61 74 29 20 7b 0d 09 | 09 63 61 73 65 20 6b 65 |hat) {..|.case ke|
|00004360| 79 44 6f 77 6e 3a 0d 09 | 09 63 61 73 65 20 61 75 |yDown:..|.case au|
|00004370| 74 6f 4b 65 79 3a 0d 09 | 09 09 6b 65 79 50 72 65 |toKey:..|..keyPre|
|00004380| 73 73 65 64 20 3d 20 65 | 76 2d 3e 6d 65 73 73 61 |ssed = e|v->messa|
|00004390| 67 65 20 26 20 63 68 61 | 72 43 6f 64 65 4d 61 73 |ge & cha|rCodeMas|
|000043a0| 6b 3b 0d 09 09 09 69 66 | 20 28 6b 65 79 50 72 65 |k;....if| (keyPre|
|000043b0| 73 73 65 64 20 3d 3d 20 | 43 52 20 7c 7c 20 6b 65 |ssed == |CR || ke|
|000043c0| 79 50 72 65 73 73 65 64 | 20 3d 3d 20 30 33 29 20 |yPressed| == 03) |
|000043d0| 7b 0d 09 09 09 09 2a 69 | 74 65 6d 20 3d 20 6f 6b |{.....*i|tem = ok|
|000043e0| 42 75 74 74 6f 6e 3b 0d | 09 09 09 09 72 65 74 75 |Button;.|....retu|
|000043f0| 72 6e 20 74 72 75 65 3b | 0d 09 09 09 7d 0d 09 09 |rn true;|....}...|
|00004400| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 6d |.break;.|..case m|
|00004410| 6f 75 73 65 44 6f 77 6e | 3a 0d 09 09 09 53 65 74 |ouseDown|:....Set|
|00004420| 50 6f 72 74 28 74 68 65 | 44 6c 67 29 3b 0d 09 09 |Port(the|Dlg);...|
|00004430| 09 64 6f 77 6e 4c 6f 63 | 20 3d 20 65 76 2d 3e 77 |.downLoc| = ev->w|
|00004440| 68 65 72 65 3b 0d 09 09 | 09 47 6c 6f 62 61 6c 54 |here;...|.GlobalT|
|00004450| 6f 4c 6f 63 61 6c 28 26 | 64 6f 77 6e 4c 6f 63 29 |oLocal(&|downLoc)|
|00004460| 3b 0d 09 09 09 69 66 20 | 28 46 69 6e 64 44 49 74 |;....if |(FindDIt|
|00004470| 65 6d 28 74 68 65 44 6c | 67 2c 64 6f 77 6e 4c 6f |em(theDl|g,downLo|
|00004480| 63 29 2b 31 20 3d 3d 20 | 35 29 20 7b 0d 09 09 09 |c)+1 == |5) {....|
|00004490| 09 47 65 74 44 49 74 65 | 6d 28 74 68 65 44 6c 67 |.GetDIte|m(theDlg|
|000044a0| 2c 35 2c 26 69 54 79 70 | 65 2c 26 69 48 6e 64 6c |,5,&iTyp|e,&iHndl|
|000044b0| 2c 26 69 52 65 63 74 29 | 3b 0d 09 09 09 09 70 6f |,&iRect)|;.....po|
|000044c0| 70 4d 65 6e 75 20 3d 20 | 47 65 74 4d 65 6e 75 28 |pMenu = |GetMenu(|
|000044d0| 6b 48 65 61 64 65 72 4d | 65 6e 75 29 3b 0d 09 09 |kHeaderM|enu);...|
|000044e0| 09 09 49 6e 73 65 72 74 | 4d 65 6e 75 28 70 6f 70 |..Insert|Menu(pop|
|000044f0| 4d 65 6e 75 2c 2d 31 29 | 3b 0d 09 09 09 09 64 6f |Menu,-1)|;.....do|
|00004500| 77 6e 4c 6f 63 2e 68 20 | 3d 20 69 52 65 63 74 2e |wnLoc.h |= iRect.|
|00004510| 6c 65 66 74 3b 0d 09 09 | 09 09 64 6f 77 6e 4c 6f |left;...|..downLo|
|00004520| 63 2e 76 20 3d 20 69 52 | 65 63 74 2e 74 6f 70 3b |c.v = iR|ect.top;|
|00004530| 0d 09 09 09 09 4c 6f 63 | 61 6c 54 6f 47 6c 6f 62 |.....Loc|alToGlob|
|00004540| 61 6c 28 26 64 6f 77 6e | 4c 6f 63 29 3b 0d 09 09 |al(&down|Loc);...|
|00004550| 09 09 43 61 6c 63 4d 65 | 6e 75 53 69 7a 65 28 70 |..CalcMe|nuSize(p|
|00004560| 6f 70 4d 65 6e 75 29 3b | 0d 09 09 09 09 63 68 6f |opMenu);|.....cho|
|00004570| 73 65 6e 20 3d 20 50 6f | 70 55 70 4d 65 6e 75 53 |sen = Po|pUpMenuS|
|00004580| 65 6c 65 63 74 28 70 6f | 70 4d 65 6e 75 2c 64 6f |elect(po|pMenu,do|
|00004590| 77 6e 4c 6f 63 2e 76 2c | 64 6f 77 6e 4c 6f 63 2e |wnLoc.v,|downLoc.|
|000045a0| 68 2c 31 29 3b 0d 09 09 | 09 09 69 66 20 28 63 68 |h,1);...|..if (ch|
|000045b0| 6f 73 65 6e 29 20 7b 0d | 09 09 09 09 09 63 68 6f |osen) {.|.....cho|
|000045c0| 69 63 65 20 3d 20 4c 6f | 57 6f 72 64 28 63 68 6f |ice = Lo|Word(cho|
|000045d0| 73 65 6e 29 3b 0d 09 09 | 09 09 09 47 65 74 49 74 |sen);...|...GetIt|
|000045e0| 65 6d 28 70 6f 70 4d 65 | 6e 75 2c 63 68 6f 69 63 |em(popMe|nu,choic|
|000045f0| 65 2c 69 53 74 72 69 6e | 67 29 3b 0d 09 09 09 09 |e,iStrin|g);.....|
|00004600| 09 47 65 74 44 49 74 65 | 6d 28 74 68 65 44 6c 67 |.GetDIte|m(theDlg|
|00004610| 2c 33 2c 26 69 54 79 70 | 65 2c 26 69 48 6e 64 6c |,3,&iTyp|e,&iHndl|
|00004620| 2c 26 69 52 65 63 74 29 | 3b 0d 09 09 09 09 09 53 |,&iRect)|;......S|
|00004630| 65 74 49 54 65 78 74 28 | 69 48 6e 64 6c 2c 69 53 |etIText(|iHndl,iS|
|00004640| 74 72 69 6e 67 29 3b 0d | 09 09 09 09 09 53 65 6c |tring);.|.....Sel|
|00004650| 49 54 65 78 74 28 74 68 | 65 44 6c 67 2c 33 2c 30 |IText(th|eDlg,3,0|
|00004660| 2c 33 32 37 36 37 29 3b | 0d 09 09 09 09 7d 0d 09 |,32767);|.....}..|
|00004670| 09 09 09 44 69 73 70 6f | 73 65 4d 65 6e 75 28 70 |...Dispo|seMenu(p|
|00004680| 6f 70 4d 65 6e 75 29 3b | 0d 09 09 09 7d 0d 09 09 |opMenu);|....}...|
|00004690| 09 62 72 65 61 6b 3b 0d | 09 7d 0d 09 72 65 74 75 |.break;.|.}..retu|
|000046a0| 72 6e 20 66 61 6c 73 65 | 3b 0d 7d 0d 0d 0d 2f 2a |rn false|;.}.../*|
|000046b0| 09 53 65 61 72 63 68 41 | 64 64 20 69 73 20 63 61 |.SearchA|dd is ca|
|000046c0| 6c 6c 65 64 20 6f 6e 63 | 65 20 66 6f 72 20 65 61 |lled onc|e for ea|
|000046d0| 63 68 20 67 72 6f 75 70 | 20 62 65 69 6e 67 20 73 |ch group| being s|
|000046e0| 65 61 72 63 68 65 64 2e | 20 20 49 74 0d 09 73 65 |earched.| It..se|
|000046f0| 61 72 63 68 65 73 20 66 | 6f 72 20 6d 61 74 63 68 |arches f|or match|
|00004700| 69 6e 67 20 61 72 74 69 | 63 6c 65 73 2e 20 20 49 |ing arti|cles. I|
|00004710| 74 20 72 65 74 75 72 6e | 73 20 74 72 75 65 20 69 |t return|s true i|
|00004720| 66 20 6f 6e 65 0d 09 6f | 72 20 6d 6f 72 65 20 6f |f one..o|r more o|
|00004730| 66 20 74 68 65 20 61 72 | 74 69 63 6c 65 73 20 69 |f the ar|ticles i|
|00004740| 6e 20 74 68 65 20 67 72 | 6f 75 70 20 6d 61 74 63 |n the gr|oup matc|
|00004750| 68 65 64 20 74 68 65 20 | 73 65 6c 65 63 74 69 6f |hed the |selectio|
|00004760| 6e 2e 0d 2a 2f 0d 0d 42 | 6f 6f 6c 65 61 6e 20 53 |n..*/..B|oolean S|
|00004770| 65 61 72 63 68 41 64 64 | 28 63 68 61 72 20 2a 68 |earchAdd|(char *h|
|00004780| 65 61 64 65 72 4e 61 6d | 65 2c 63 68 61 72 20 2a |eaderNam|e,char *|
|00004790| 68 65 61 64 65 72 43 6f | 6e 74 65 6e 74 73 2c 20 |headerCo|ntents, |
|000047a0| 54 47 72 6f 75 70 20 2a | 67 72 6f 75 70 44 61 74 |TGroup *|groupDat|
|000047b0| 61 29 0d 7b 0d 09 54 53 | 75 62 6a 65 63 74 20 73 |a).{..TS|ubject s|
|000047c0| 75 62 6a 65 63 74 73 5b | 36 34 5d 3b 0d 09 6c 6f |ubjects[|64];..lo|
|000047d0| 6e 67 20 6e 75 6d 53 75 | 62 6a 65 63 74 73 3b 0d |ng numSu|bjects;.|
|000047e0| 09 6c 6f 6e 67 20 69 6e | 64 65 78 2c 72 46 69 72 |.long in|dex,rFir|
|000047f0| 73 74 2c 72 4c 61 73 74 | 2c 66 69 72 73 74 55 6e |st,rLast|,firstUn|
|00004800| 72 65 61 64 20 3d 20 30 | 2c 6c 61 73 74 55 6e 72 |read = 0|,lastUnr|
|00004810| 65 61 64 20 3d 20 30 3b | 0d 09 4f 53 45 72 72 20 |ead = 0;|..OSErr |
|00004820| 65 72 72 20 3d 20 6e 6f | 45 72 72 3b 0d 09 42 6f |err = no|Err;..Bo|
|00004830| 6f 6c 65 61 6e 20 67 6f | 74 4f 6e 65 20 3d 20 66 |olean go|tOne = f|
|00004840| 61 6c 73 65 3b 0d 09 63 | 68 61 72 20 73 74 61 74 |alse;..c|har stat|
|00004850| 75 73 53 74 72 5b 32 35 | 36 5d 3b 0d 09 0d 09 66 |usStr[25|6];....f|
|00004860| 6f 72 20 28 72 46 69 72 | 73 74 20 3d 20 67 72 6f |or (rFir|st = gro|
|00004870| 75 70 44 61 74 61 2d 3e | 66 69 72 73 74 4d 65 73 |upData->|firstMes|
|00004880| 73 3b 20 72 46 69 72 73 | 74 20 3c 3d 20 67 72 6f |s; rFirs|t <= gro|
|00004890| 75 70 44 61 74 61 2d 3e | 6c 61 73 74 4d 65 73 73 |upData->|lastMess|
|000048a0| 20 26 26 20 65 72 72 20 | 3d 3d 20 6e 6f 45 72 72 | && err |== noErr|
|000048b0| 3b 20 72 46 69 72 73 74 | 20 2b 3d 20 36 34 29 20 |; rFirst| += 64) |
|000048c0| 7b 0d 09 09 72 4c 61 73 | 74 20 3d 20 28 28 72 46 |{...rLas|t = ((rF|
|000048d0| 69 72 73 74 2b 36 33 29 | 20 3e 20 67 72 6f 75 70 |irst+63)| > group|
|000048e0| 44 61 74 61 2d 3e 6c 61 | 73 74 4d 65 73 73 29 20 |Data->la|stMess) |
|000048f0| 3f 20 67 72 6f 75 70 44 | 61 74 61 2d 3e 6c 61 73 |? groupD|ata->las|
|00004900| 74 4d 65 73 73 20 3a 20 | 72 46 69 72 73 74 2b 36 |tMess : |rFirst+6|
|00004910| 33 3b 09 0d 09 09 65 72 | 72 20 3d 20 47 65 74 4d |3;....er|r = GetM|
|00004920| 65 73 73 61 67 65 73 28 | 67 72 6f 75 70 44 61 74 |essages(|groupDat|
|00004930| 61 2d 3e 6e 61 6d 65 2c | 72 46 69 72 73 74 2c 72 |a->name,|rFirst,r|
|00004940| 4c 61 73 74 2c 73 75 62 | 6a 65 63 74 73 2c 26 6e |Last,sub|jects,&n|
|00004950| 75 6d 53 75 62 6a 65 63 | 74 73 2c 68 65 61 64 65 |umSubjec|ts,heade|
|00004960| 72 4e 61 6d 65 29 3b 0d | 09 09 73 74 72 63 70 79 |rName);.|..strcpy|
|00004970| 28 73 74 61 74 75 73 53 | 74 72 2c 22 53 65 61 72 |(statusS|tr,"Sear|
|00004980| 63 68 69 6e 67 20 67 72 | 6f 75 70 3a 20 22 29 3b |ching gr|oup: ");|
|00004990| 0d 09 09 73 74 72 63 61 | 74 28 73 74 61 74 75 73 |...strca|t(status|
|000049a0| 53 74 72 2c 67 72 6f 75 | 70 44 61 74 61 2d 3e 6e |Str,grou|pData->n|
|000049b0| 61 6d 65 29 3b 0d 09 09 | 53 74 61 74 75 73 57 69 |ame);...|StatusWi|
|000049c0| 6e 64 6f 77 28 73 74 61 | 74 75 73 53 74 72 2c 2d |ndow(sta|tusStr,-|
|000049d0| 31 29 3b 0d 09 09 69 66 | 20 28 65 72 72 3d 3d 6e |1);...if| (err==n|
|000049e0| 6f 45 72 72 29 0d 09 09 | 09 66 6f 72 20 28 69 6e |oErr)...|.for (in|
|000049f0| 64 65 78 3d 30 3b 20 69 | 6e 64 65 78 20 3c 20 6e |dex=0; i|ndex < n|
|00004a00| 75 6d 53 75 62 6a 65 63 | 74 73 3b 20 69 6e 64 65 |umSubjec|ts; inde|
|00004a10| 78 2b 2b 29 20 7b 0d 09 | 09 09 09 69 66 20 28 4d |x++) {..|...if (M|
|00004a20| 79 53 65 61 72 63 68 28 | 73 75 62 6a 65 63 74 73 |ySearch(|subjects|
|00004a30| 5b 69 6e 64 65 78 5d 2e | 6e 61 6d 65 2c 68 65 61 |[index].|name,hea|
|00004a40| 64 65 72 43 6f 6e 74 65 | 6e 74 73 2c 73 74 72 6c |derConte|nts,strl|
|00004a50| 65 6e 28 73 75 62 6a 65 | 63 74 73 5b 69 6e 64 65 |en(subje|cts[inde|
|00004a60| 78 5d 2e 6e 61 6d 65 29 | 2c 73 74 72 6c 65 6e 28 |x].name)|,strlen(|
|00004a70| 68 65 61 64 65 72 43 6f | 6e 74 65 6e 74 73 29 29 |headerCo|ntents))|
|00004a80| 20 3d 3d 20 30 29 20 7b | 0d 09 09 09 09 09 69 66 | == 0) {|......if|
|00004a90| 20 28 66 69 72 73 74 55 | 6e 72 65 61 64 20 3d 3d | (firstU|nread ==|
|00004aa0| 20 30 29 0d 09 09 09 09 | 09 09 66 69 72 73 74 55 | 0).....|..firstU|
|00004ab0| 6e 72 65 61 64 20 3d 20 | 6c 61 73 74 55 6e 72 65 |nread = |lastUnre|
|00004ac0| 61 64 20 3d 20 73 75 62 | 6a 65 63 74 73 5b 69 6e |ad = sub|jects[in|
|00004ad0| 64 65 78 5d 2e 6e 75 6d | 62 65 72 3b 0d 09 09 09 |dex].num|ber;....|
|00004ae0| 09 09 65 6c 73 65 0d 09 | 09 09 09 09 09 6c 61 73 |..else..|.....las|
|00004af0| 74 55 6e 72 65 61 64 20 | 3d 20 73 75 62 6a 65 63 |tUnread |= subjec|
|00004b00| 74 73 5b 69 6e 64 65 78 | 5d 2e 6e 75 6d 62 65 72 |ts[index|].number|
|00004b10| 3b 0d 09 09 09 09 7d 0d | 09 09 09 09 65 6c 73 65 |;.....}.|....else|
|00004b20| 20 7b 0d 09 09 09 09 09 | 69 66 20 28 66 69 72 73 | {......|if (firs|
|00004b30| 74 55 6e 72 65 61 64 20 | 21 3d 20 30 29 20 7b 0d |tUnread |!= 0) {.|
|00004b40| 09 09 09 09 09 09 4d 61 | 72 6b 52 65 61 64 28 66 |......Ma|rkRead(f|
|00004b50| 69 72 73 74 55 6e 72 65 | 61 64 2c 6c 61 73 74 55 |irstUnre|ad,lastU|
|00004b60| 6e 72 65 61 64 2c 67 72 | 6f 75 70 44 61 74 61 29 |nread,gr|oupData)|
|00004b70| 3b 0d 09 09 09 09 09 09 | 67 6f 74 4f 6e 65 20 3d |;.......|gotOne =|
|00004b80| 20 74 72 75 65 3b 0d 09 | 09 09 09 09 09 66 69 72 | true;..|.....fir|
|00004b90| 73 74 55 6e 72 65 61 64 | 20 3d 20 30 3b 0d 09 09 |stUnread| = 0;...|
|00004ba0| 09 09 09 7d 0d 09 09 09 | 09 7d 0d 09 09 09 09 4d |...}....|.}.....M|
|00004bb0| 79 44 69 73 70 6f 73 50 | 74 72 28 73 75 62 6a 65 |yDisposP|tr(subje|
|00004bc0| 63 74 73 5b 69 6e 64 65 | 78 5d 2e 6e 61 6d 65 29 |cts[inde|x].name)|
|00004bd0| 3b 0d 09 09 09 7d 0d 09 | 7d 0d 09 69 66 20 28 66 |;....}..|}..if (f|
|00004be0| 69 72 73 74 55 6e 72 65 | 61 64 20 21 3d 20 30 29 |irstUnre|ad != 0)|
|00004bf0| 20 7b 0d 09 09 4d 61 72 | 6b 52 65 61 64 28 66 69 | {...Mar|kRead(fi|
|00004c00| 72 73 74 55 6e 72 65 61 | 64 2c 67 72 6f 75 70 44 |rstUnrea|d,groupD|
|00004c10| 61 74 61 2d 3e 6c 61 73 | 74 4d 65 73 73 2c 67 72 |ata->las|tMess,gr|
|00004c20| 6f 75 70 44 61 74 61 29 | 3b 0d 09 09 67 6f 74 4f |oupData)|;...gotO|
|00004c30| 6e 65 20 3d 20 74 72 75 | 65 3b 0d 09 7d 0d 09 72 |ne = tru|e;..}..r|
|00004c40| 65 74 75 72 6e 20 67 6f | 74 4f 6e 65 3b 0d 7d 0d |eturn go|tOne;.}.|
|00004c50| 0d 0d 2f 2a 09 44 6f 4e | 61 72 72 6f 77 53 65 6c |../*.DoN|arrowSel|
|00004c60| 65 63 74 69 6f 6e 20 69 | 73 20 63 61 6c 6c 65 64 |ection i|s called|
|00004c70| 20 69 6e 20 72 65 73 70 | 6f 6e 73 65 20 74 6f 20 | in resp|onse to |
|00004c80| 74 68 65 20 4e 61 72 72 | 6f 77 20 53 65 6c 65 63 |the Narr|ow Selec|
|00004c90| 74 69 6f 6e 0d 09 6d 65 | 6e 75 20 63 6f 6d 6d 61 |tion..me|nu comma|
|00004ca0| 6e 64 2e 20 20 54 68 69 | 73 20 72 6f 75 74 69 6e |nd. Thi|s routin|
|00004cb0| 65 20 64 69 73 70 6c 61 | 79 73 20 61 20 64 69 61 |e displa|ys a dia|
|00004cc0| 6c 6f 67 20 62 6f 78 2c | 20 77 68 65 72 65 20 74 |log box,| where t|
|00004cd0| 68 65 0d 09 75 73 65 72 | 20 65 6e 74 65 72 73 20 |he..user| enters |
|00004ce0| 61 20 73 74 72 69 6e 67 | 20 77 68 69 63 68 20 6d |a string| which m|
|00004cf0| 75 73 74 20 62 65 20 63 | 6f 6e 74 61 69 6e 65 64 |ust be c|ontained|
|00004d00| 20 69 6e 20 61 6c 6c 20 | 6f 66 20 74 68 65 0d 09 | in all |of the..|
|00004d10| 65 6e 74 72 69 65 73 20 | 69 6e 20 61 20 67 72 6f |entries |in a gro|
|00004d20| 75 70 20 6f 72 20 73 75 | 62 6a 65 63 74 20 6c 69 |up or su|bject li|
|00004d30| 73 74 2e 0d 2a 2f 0d 0d | 76 6f 69 64 20 44 6f 4e |st..*/..|void DoN|
|00004d40| 61 72 72 6f 77 53 65 6c | 65 63 74 69 6f 6e 28 76 |arrowSel|ection(v|
|00004d50| 6f 69 64 29 0d 7b 0d 09 | 44 69 61 6c 6f 67 50 74 |oid).{..|DialogPt|
|00004d60| 72 20 74 68 65 44 6c 67 | 3b 0d 09 73 68 6f 72 74 |r theDlg|;..short|
|00004d70| 20 69 74 65 6d 3b 0d 09 | 73 68 6f 72 74 20 69 54 | item;..|short iT|
|00004d80| 79 70 65 3b 0d 09 48 61 | 6e 64 6c 65 20 69 48 6e |ype;..Ha|ndle iHn|
|00004d90| 64 6c 3b 0d 09 52 65 63 | 74 20 69 52 65 63 74 3b |dl;..Rec|t iRect;|
|00004da0| 0d 09 53 74 72 32 35 35 | 20 74 68 65 54 65 78 74 |..Str255| theText|
|00004db0| 3b 0d 09 54 77 69 6e 64 | 6f 77 49 6e 66 6f 20 2a |;..Twind|owInfo *|
|00004dc0| 69 6e 66 6f 3b 0d 09 63 | 68 61 72 20 66 69 6c 74 |info;..c|har filt|
|00004dd0| 65 72 43 6f 70 79 5b 32 | 35 36 5d 3b 0d 09 73 68 |erCopy[2|56];..sh|
|00004de0| 6f 72 74 20 66 69 6c 74 | 65 72 43 6f 70 79 4c 65 |ort filt|erCopyLe|
|00004df0| 6e 2c 69 6e 64 65 78 3b | 0d 09 0d 09 69 66 20 28 |n,index;|....if (|
|00004e00| 21 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 29 20 |!FrontWi|ndow()) |
|00004e10| 7b 0d 09 09 53 79 73 42 | 65 65 70 28 31 29 3b 0d |{...SysB|eep(1);.|
|00004e20| 09 09 72 65 74 75 72 6e | 3b 0d 09 7d 0d 09 0d 09 |..return|;..}....|
|00004e30| 69 6e 66 6f 20 3d 20 28 | 54 77 69 6e 64 6f 77 49 |info = (|TwindowI|
|00004e40| 6e 66 6f 20 2a 29 20 47 | 65 74 57 52 65 66 43 6f |nfo *) G|etWRefCo|
|00004e50| 6e 28 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 29 |n(FrontW|indow())|
|00004e60| 3b 0d 09 66 69 6c 74 65 | 72 43 6f 70 79 4c 65 6e |;..filte|rCopyLen|
|00004e70| 20 3d 20 69 6e 66 6f 2d | 3e 66 69 6c 74 65 72 4c | = info-|>filterL|
|00004e80| 65 6e 3b 0d 09 73 74 72 | 6e 63 70 79 28 66 69 6c |en;..str|ncpy(fil|
|00004e90| 74 65 72 43 6f 70 79 2c | 69 6e 66 6f 2d 3e 66 69 |terCopy,|info->fi|
|00004ea0| 6c 74 65 72 2c 66 69 6c | 74 65 72 43 6f 70 79 4c |lter,fil|terCopyL|
|00004eb0| 65 6e 29 3b 0d 09 0d 09 | 74 68 65 44 6c 67 20 3d |en);....|theDlg =|
|00004ec0| 20 47 65 74 4e 65 77 44 | 69 61 6c 6f 67 28 6b 4e | GetNewD|ialog(kN|
|00004ed0| 61 72 72 6f 77 44 6c 67 | 2c 6e 69 6c 2c 28 57 69 |arrowDlg|,nil,(Wi|
|00004ee0| 6e 64 6f 77 50 74 72 29 | 2d 31 29 3b 0d 09 4f 75 |ndowPtr)|-1);..Ou|
|00004ef0| 74 6c 69 6e 65 4f 4b 28 | 74 68 65 44 6c 67 29 3b |tlineOK(|theDlg);|
|00004f00| 0d 09 0d 09 69 66 20 28 | 69 6e 66 6f 2d 3e 66 69 |....if (|info->fi|
|00004f10| 6c 74 65 72 4c 65 6e 20 | 3e 20 30 29 20 7b 0d 09 |lterLen |> 0) {..|
|00004f20| 09 42 6c 6f 63 6b 4d 6f | 76 65 28 69 6e 66 6f 2d |.BlockMo|ve(info-|
|00004f30| 3e 66 69 6c 74 65 72 2c | 74 68 65 54 65 78 74 2b |>filter,|theText+|
|00004f40| 31 2c 69 6e 66 6f 2d 3e | 66 69 6c 74 65 72 4c 65 |1,info->|filterLe|
|00004f50| 6e 29 3b 0d 09 09 74 68 | 65 54 65 78 74 5b 30 5d |n);...th|eText[0]|
|00004f60| 20 3d 20 69 6e 66 6f 2d | 3e 66 69 6c 74 65 72 4c | = info-|>filterL|
|00004f70| 65 6e 3b 0d 09 09 47 65 | 74 44 49 74 65 6d 28 74 |en;...Ge|tDItem(t|
|00004f80| 68 65 44 6c 67 2c 33 2c | 26 69 54 79 70 65 2c 26 |heDlg,3,|&iType,&|
|00004f90| 69 48 6e 64 6c 2c 26 69 | 52 65 63 74 29 3b 0d 09 |iHndl,&i|Rect);..|
|00004fa0| 09 53 65 74 49 54 65 78 | 74 28 69 48 6e 64 6c 2c |.SetITex|t(iHndl,|
|00004fb0| 74 68 65 54 65 78 74 29 | 3b 0d 09 09 53 65 6c 49 |theText)|;...SelI|
|00004fc0| 54 65 78 74 28 74 68 65 | 44 6c 67 2c 33 2c 33 32 |Text(the|Dlg,3,32|
|00004fd0| 30 30 30 2c 33 32 30 30 | 30 29 3b 0d 09 7d 0d 0d |000,3200|0);..}..|
|00004fe0| 09 64 6f 20 7b 0d 09 09 | 4d 6f 64 61 6c 44 69 61 |.do {...|ModalDia|
|00004ff0| 6c 6f 67 28 4e 61 72 72 | 6f 77 46 69 6c 74 65 72 |log(Narr|owFilter|
|00005000| 2c 26 69 74 65 6d 29 3b | 0d 09 09 53 65 74 43 75 |,&item);|...SetCu|
|00005010| 72 73 6f 72 28 26 51 44 | 41 52 52 4f 57 29 3b 0d |rsor(&QD|ARROW);.|
|00005020| 09 7d 20 77 68 69 6c 65 | 20 28 69 74 65 6d 20 21 |.} while| (item !|
|00005030| 3d 20 6f 6b 42 75 74 74 | 6f 6e 20 26 26 20 69 74 |= okButt|on && it|
|00005040| 65 6d 20 21 3d 20 63 61 | 6e 63 65 6c 42 75 74 74 |em != ca|ncelButt|
|00005050| 6f 6e 29 3b 0d 0d 09 69 | 66 20 28 69 74 65 6d 20 |on);...i|f (item |
|00005060| 3d 3d 20 63 61 6e 63 65 | 6c 42 75 74 74 6f 6e 29 |== cance|lButton)|
|00005070| 20 7b 0d 09 09 69 66 20 | 28 69 6e 66 6f 2d 3e 66 | {...if |(info->f|
|00005080| 69 6c 74 65 72 4c 65 6e | 20 3e 20 30 29 0d 09 09 |ilterLen| > 0)...|
|00005090| 09 45 6e 64 53 65 61 72 | 63 68 28 69 6e 66 6f 29 |.EndSear|ch(info)|
|000050a0| 3b 0d 09 09 69 66 20 28 | 66 69 6c 74 65 72 43 6f |;...if (|filterCo|
|000050b0| 70 79 4c 65 6e 20 3e 20 | 30 29 20 7b 0d 09 09 09 |pyLen > |0) {....|
|000050c0| 4e 65 77 53 65 61 72 63 | 68 28 69 6e 66 6f 2c 66 |NewSearc|h(info,f|
|000050d0| 69 6c 74 65 72 43 6f 70 | 79 5b 30 5d 29 3b 0d 09 |ilterCop|y[0]);..|
|000050e0| 09 09 66 6f 72 20 28 69 | 6e 64 65 78 3d 31 3b 20 |..for (i|ndex=1; |
|000050f0| 69 6e 64 65 78 3c 66 69 | 6c 74 65 72 43 6f 70 79 |index<fi|lterCopy|
|00005100| 4c 65 6e 3b 20 69 6e 64 | 65 78 2b 2b 29 0d 09 09 |Len; ind|ex++)...|
|00005110| 09 09 4e 61 72 72 6f 77 | 53 65 61 72 63 68 28 69 |..Narrow|Search(i|
|00005120| 6e 66 6f 2c 66 69 6c 74 | 65 72 43 6f 70 79 5b 69 |nfo,filt|erCopy[i|
|00005130| 6e 64 65 78 5d 29 3b 0d | 09 09 7d 0d 09 7d 0d 09 |ndex]);.|..}..}..|
|00005140| 0d 09 44 69 73 70 6f 73 | 44 69 61 6c 6f 67 28 74 |..Dispos|Dialog(t|
|00005150| 68 65 44 6c 67 29 3b 0d | 7d 0d 0d 0d 2f 2a 09 4e |heDlg);.|}.../*.N|
|00005160| 61 72 72 6f 77 46 69 6c | 74 65 72 20 69 73 20 74 |arrowFil|ter is t|
|00005170| 68 65 20 64 69 61 6c 6f | 67 20 66 69 6c 74 65 72 |he dialo|g filter|
|00005180| 20 66 6f 72 20 74 68 65 | 20 6e 61 72 72 6f 77 20 | for the| narrow |
|00005190| 73 65 6c 65 63 74 69 6f | 6e 0d 09 73 65 61 72 63 |selectio|n..searc|
|000051a0| 68 20 64 69 61 6c 6f 67 | 20 62 6f 78 2e 0d 2a 2f |h dialog| box..*/|
|000051b0| 0d 0d 70 61 73 63 61 6c | 20 42 6f 6f 6c 65 61 6e |..pascal| Boolean|
|000051c0| 20 4e 61 72 72 6f 77 46 | 69 6c 74 65 72 28 44 69 | NarrowF|ilter(Di|
|000051d0| 61 6c 6f 67 50 74 72 20 | 74 68 65 44 69 61 6c 6f |alogPtr |theDialo|
|000051e0| 67 2c 45 76 65 6e 74 52 | 65 63 6f 72 64 20 2a 74 |g,EventR|ecord *t|
|000051f0| 68 65 45 76 65 6e 74 2c | 73 68 6f 72 74 20 2a 69 |heEvent,|short *i|
|00005200| 74 65 6d 48 69 74 29 0d | 7b 0d 09 54 77 69 6e 64 |temHit).|{..Twind|
|00005210| 6f 77 49 6e 66 6f 20 2a | 69 6e 66 6f 3b 0d 09 63 |owInfo *|info;..c|
|00005220| 68 61 72 20 74 68 65 43 | 68 61 72 3b 0d 09 75 6e |har theC|har;..un|
|00005230| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 73 61 76 65 |signed l|ong save|
|00005240| 42 69 74 73 3b 0d 09 0d | 09 69 66 20 28 74 68 65 |Bits;...|.if (the|
|00005250| 45 76 65 6e 74 2d 3e 77 | 68 61 74 20 3d 3d 20 6b |Event->w|hat == k|
|00005260| 65 79 44 6f 77 6e 20 7c | 7c 20 74 68 65 45 76 65 |eyDown ||| theEve|
|00005270| 6e 74 2d 3e 77 68 61 74 | 20 3d 3d 20 61 75 74 6f |nt->what| == auto|
|00005280| 4b 65 79 29 20 7b 0d 09 | 09 73 61 76 65 42 69 74 |Key) {..|.saveBit|
|00005290| 73 20 3d 20 28 74 68 65 | 45 76 65 6e 74 2d 3e 6d |s = (the|Event->m|
|000052a0| 65 73 73 61 67 65 20 26 | 20 30 78 46 46 46 46 46 |essage &| 0xFFFFF|
|000052b0| 46 30 30 29 3b 0d 09 09 | 74 68 65 43 68 61 72 20 |F00);...|theChar |
|000052c0| 3d 20 74 6f 75 70 70 65 | 72 28 74 68 65 45 76 65 |= touppe|r(theEve|
|000052d0| 6e 74 2d 3e 6d 65 73 73 | 61 67 65 20 26 20 63 68 |nt->mess|age & ch|
|000052e0| 61 72 43 6f 64 65 4d 61 | 73 6b 29 3b 0d 09 09 74 |arCodeMa|sk);...t|
|000052f0| 68 65 45 76 65 6e 74 2d | 3e 6d 65 73 73 61 67 65 |heEvent-|>message|
|00005300| 20 3d 20 73 61 76 65 42 | 69 74 73 20 7c 20 74 68 | = saveB|its | th|
|00005310| 65 43 68 61 72 3b 0d 09 | 09 53 65 6c 49 54 65 78 |eChar;..|.SelITex|
|00005320| 74 28 74 68 65 44 69 61 | 6c 6f 67 2c 33 2c 33 32 |t(theDia|log,3,32|
|00005330| 30 30 30 2c 33 32 30 30 | 30 29 3b 0d 09 09 69 6e |000,3200|0);...in|
|00005340| 66 6f 20 3d 20 28 54 77 | 69 6e 64 6f 77 49 6e 66 |fo = (Tw|indowInf|
|00005350| 6f 20 2a 29 20 47 65 74 | 57 52 65 66 43 6f 6e 28 |o *) Get|WRefCon(|
|00005360| 28 57 69 6e 64 6f 77 50 | 74 72 29 28 28 57 69 6e |(WindowP|tr)((Win|
|00005370| 64 6f 77 50 65 65 6b 29 | 46 72 6f 6e 74 57 69 6e |dowPeek)|FrontWin|
|00005380| 64 6f 77 28 29 29 2d 3e | 6e 65 78 74 57 69 6e 64 |dow())->|nextWind|
|00005390| 6f 77 29 3b 20 2f 2a 20 | 77 69 6e 64 6f 77 20 61 |ow); /* |window a|
|000053a0| 66 74 65 72 20 64 6c 6f | 67 20 2a 2f 0d 09 09 0d |fter dlo|g */....|
|000053b0| 09 09 73 77 69 74 63 68 | 20 28 74 68 65 43 68 61 |..switch| (theCha|
|000053c0| 72 29 20 7b 0d 09 09 09 | 63 61 73 65 20 43 52 3a |r) {....|case CR:|
|000053d0| 0d 09 09 09 09 2a 69 74 | 65 6d 48 69 74 20 3d 20 |.....*it|emHit = |
|000053e0| 31 3b 0d 09 09 09 09 72 | 65 74 75 72 6e 20 74 72 |1;.....r|eturn tr|
|000053f0| 75 65 3b 0d 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |ue;.....|break;..|
|00005400| 09 09 63 61 73 65 20 30 | 78 30 38 3a 0d 09 09 09 |..case 0|x08:....|
|00005410| 09 69 66 20 28 69 6e 66 | 6f 2d 3e 66 69 6c 74 65 |.if (inf|o->filte|
|00005420| 72 4c 65 6e 20 3e 20 30 | 29 0d 09 09 09 09 09 57 |rLen > 0|)......W|
|00005430| 69 64 65 6e 53 65 61 72 | 63 68 28 69 6e 66 6f 29 |idenSear|ch(info)|
|00005440| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|00005450| 64 65 66 61 75 6c 74 3a | 0d 09 09 09 09 69 66 20 |default:|.....if |
|00005460| 28 69 6e 66 6f 2d 3e 66 | 69 6c 74 65 72 4c 65 6e |(info->f|ilterLen|
|00005470| 20 3d 3d 20 30 29 0d 09 | 09 09 09 09 4e 65 77 53 | == 0)..|....NewS|
|00005480| 65 61 72 63 68 28 69 6e | 66 6f 2c 74 68 65 43 68 |earch(in|fo,theCh|
|00005490| 61 72 29 3b 0d 09 09 09 | 09 65 6c 73 65 0d 09 09 |ar);....|.else...|
|000054a0| 09 09 09 4e 61 72 72 6f | 77 53 65 61 72 63 68 28 |...Narro|wSearch(|
|000054b0| 69 6e 66 6f 2c 74 68 65 | 43 68 61 72 29 3b 0d 09 |info,the|Char);..|
|000054c0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 7d 0d 09 7d |...break|;...}..}|
|000054d0| 0d 09 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d |..return| false;.|
|000054e0| 7d 0d 0d 0d 2f 2a 09 4e | 65 77 53 65 61 72 63 68 |}.../*.N|ewSearch|
|000054f0| 20 69 73 20 63 61 6c 6c | 65 64 20 62 79 20 74 68 | is call|ed by th|
|00005500| 65 20 6e 61 72 72 6f 77 | 20 73 65 6c 65 63 74 69 |e narrow| selecti|
|00005510| 6f 6e 20 66 69 6c 74 65 | 72 20 74 6f 20 73 74 61 |on filte|r to sta|
|00005520| 72 74 0d 09 61 20 6e 65 | 77 20 6e 61 72 72 6f 77 |rt..a ne|w narrow|
|00005530| 69 6e 67 20 73 65 61 72 | 63 68 2e 20 20 49 74 20 |ing sear|ch. It |
|00005540| 63 72 65 61 74 65 73 20 | 61 20 73 65 63 6f 6e 64 |creates |a second|
|00005550| 61 72 79 20 6c 69 73 74 | 20 6d 61 6e 61 67 65 72 |ary list| manager|
|00005560| 0d 09 6c 69 73 74 20 77 | 68 69 63 68 20 69 73 20 |..list w|hich is |
|00005570| 76 69 73 69 62 6c 65 20 | 6f 76 65 72 20 74 6f 70 |visible |over top|
|00005580| 20 6f 66 20 74 68 65 20 | 6d 61 69 6e 20 6c 69 73 | of the |main lis|
|00005590| 74 2e 20 20 20 45 6e 74 | 72 69 65 73 0d 09 77 68 |t. Ent|ries..wh|
|000055a0| 69 63 68 20 6d 61 74 63 | 68 20 61 72 65 20 61 64 |ich matc|h are ad|
|000055b0| 64 65 64 20 74 6f 20 74 | 68 69 73 20 6c 69 73 74 |ded to t|his list|
|000055c0| 2e 0d 2a 2f 0d 0d 76 6f | 69 64 20 4e 65 77 53 65 |..*/..vo|id NewSe|
|000055d0| 61 72 63 68 28 54 77 69 | 6e 64 6f 77 49 6e 66 6f |arch(Twi|ndowInfo|
|000055e0| 20 2a 69 6e 66 6f 2c 63 | 68 61 72 20 74 68 65 43 | *info,c|har theC|
|000055f0| 68 61 72 29 0d 7b 0d 09 | 43 65 6c 6c 20 74 68 65 |har).{..|Cell the|
|00005600| 43 65 6c 6c 2c 6e 65 77 | 43 65 6c 6c 3b 0d 09 63 |Cell,new|Cell;..c|
|00005610| 68 61 72 20 63 65 6c 6c | 44 61 74 61 5b 32 35 36 |har cell|Data[256|
|00005620| 5d 3b 0d 09 73 68 6f 72 | 74 20 64 61 74 61 4c 65 |];..shor|t dataLe|
|00005630| 6e 3b 0d 09 4c 69 73 74 | 48 61 6e 64 6c 65 20 6e |n;..List|Handle n|
|00005640| 65 77 4c 69 73 74 3b 0d | 09 57 69 6e 64 6f 77 50 |ewList;.|.WindowP|
|00005650| 74 72 20 74 68 65 57 69 | 6e 64 6f 77 3b 0d 09 0d |tr theWi|ndow;...|
|00005660| 09 74 68 65 57 69 6e 64 | 6f 77 20 3d 20 28 57 69 |.theWind|ow = (Wi|
|00005670| 6e 64 6f 77 50 74 72 29 | 28 28 57 69 6e 64 6f 77 |ndowPtr)|((Window|
|00005680| 50 65 65 6b 29 46 72 6f | 6e 74 57 69 6e 64 6f 77 |Peek)Fro|ntWindow|
|00005690| 28 29 29 2d 3e 6e 65 78 | 74 57 69 6e 64 6f 77 3b |())->nex|tWindow;|
|000056a0| 0d 09 69 6e 66 6f 2d 3e | 6e 61 72 72 6f 77 4c 69 |..info->|narrowLi|
|000056b0| 73 74 20 3d 20 28 4c 69 | 73 74 48 61 6e 64 6c 65 |st = (Li|stHandle|
|000056c0| 29 20 69 6e 66 6f 2d 3e | 64 61 74 61 3b 0d 09 6e |) info->|data;..n|
|000056d0| 65 77 4c 69 73 74 20 3d | 20 4e 65 77 4c 69 73 74 |ewList =| NewList|
|000056e0| 28 74 68 65 57 69 6e 64 | 6f 77 29 3b 0d 09 69 6e |(theWind|ow);..in|
|000056f0| 66 6f 2d 3e 64 61 74 61 | 20 3d 20 28 48 61 6e 64 |fo->data| = (Hand|
|00005700| 6c 65 29 20 6e 65 77 4c | 69 73 74 3b 0d 09 4c 41 |le) newL|ist;..LA|
|00005710| 63 74 69 76 61 74 65 28 | 66 61 6c 73 65 2c 69 6e |ctivate(|false,in|
|00005720| 66 6f 2d 3e 6e 61 72 72 | 6f 77 4c 69 73 74 29 3b |fo->narr|owList);|
|00005730| 0d 09 28 2a 2a 6e 65 77 | 4c 69 73 74 29 2e 6c 43 |..(**new|List).lC|
|00005740| 6c 69 6b 4c 6f 6f 70 20 | 3d 20 28 2a 2a 28 69 6e |likLoop |= (**(in|
|00005750| 66 6f 2d 3e 6e 61 72 72 | 6f 77 4c 69 73 74 29 29 |fo->narr|owList))|
|00005760| 2e 6c 43 6c 69 6b 4c 6f | 6f 70 3b 0d 09 0d 09 69 |.lClikLo|op;....i|
|00005770| 6e 66 6f 2d 3e 66 69 6c | 74 65 72 5b 69 6e 66 6f |nfo->fil|ter[info|
|00005780| 2d 3e 66 69 6c 74 65 72 | 4c 65 6e 2b 2b 5d 20 3d |->filter|Len++] =|
|00005790| 20 74 68 65 43 68 61 72 | 3b 0d 09 0d 09 53 65 74 | theChar|;....Set|
|000057a0| 50 74 28 26 74 68 65 43 | 65 6c 6c 2c 30 2c 30 29 |Pt(&theC|ell,0,0)|
|000057b0| 3b 0d 09 53 65 74 50 74 | 28 26 6e 65 77 43 65 6c |;..SetPt|(&newCel|
|000057c0| 6c 2c 30 2c 30 29 3b 0d | 09 77 68 69 6c 65 20 28 |l,0,0);.|.while (|
|000057d0| 50 74 49 6e 52 65 63 74 | 28 74 68 65 43 65 6c 6c |PtInRect|(theCell|
|000057e0| 2c 26 28 2a 2a 28 69 6e | 66 6f 2d 3e 6e 61 72 72 |,&(**(in|fo->narr|
|000057f0| 6f 77 4c 69 73 74 29 29 | 2e 64 61 74 61 42 6f 75 |owList))|.dataBou|
|00005800| 6e 64 73 29 20 26 26 0d | 09 09 09 4c 53 65 61 72 |nds) &&.|...LSear|
|00005810| 63 68 28 69 6e 66 6f 2d | 3e 66 69 6c 74 65 72 2c |ch(info-|>filter,|
|00005820| 69 6e 66 6f 2d 3e 66 69 | 6c 74 65 72 4c 65 6e 2c |info->fi|lterLen,|
|00005830| 4d 79 53 65 61 72 63 68 | 2c 26 74 68 65 43 65 6c |MySearch|,&theCel|
|00005840| 6c 2c 69 6e 66 6f 2d 3e | 6e 61 72 72 6f 77 4c 69 |l,info->|narrowLi|
|00005850| 73 74 29 29 20 7b 0d 09 | 09 4c 41 64 64 52 6f 77 |st)) {..|.LAddRow|
|00005860| 28 31 2c 6e 65 77 43 65 | 6c 6c 2e 76 2c 6e 65 77 |(1,newCe|ll.v,new|
|00005870| 4c 69 73 74 29 3b 0d 09 | 09 64 61 74 61 4c 65 6e |List);..|.dataLen|
|00005880| 20 3d 20 32 35 36 3b 0d | 09 09 4c 47 65 74 43 65 | = 256;.|..LGetCe|
|00005890| 6c 6c 28 63 65 6c 6c 44 | 61 74 61 2c 26 64 61 74 |ll(cellD|ata,&dat|
|000058a0| 61 4c 65 6e 2c 74 68 65 | 43 65 6c 6c 2c 69 6e 66 |aLen,the|Cell,inf|
|000058b0| 6f 2d 3e 6e 61 72 72 6f | 77 4c 69 73 74 29 3b 0d |o->narro|wList);.|
|000058c0| 09 09 4c 53 65 74 43 65 | 6c 6c 28 63 65 6c 6c 44 |..LSetCe|ll(cellD|
|000058d0| 61 74 61 2c 64 61 74 61 | 4c 65 6e 2c 6e 65 77 43 |ata,data|Len,newC|
|000058e0| 65 6c 6c 2c 6e 65 77 4c | 69 73 74 29 3b 0d 09 09 |ell,newL|ist);...|
|000058f0| 74 68 65 43 65 6c 6c 2e | 76 2b 2b 3b 0d 09 09 6e |theCell.|v++;...n|
|00005900| 65 77 43 65 6c 6c 2e 76 | 2b 2b 3b 0d 09 7d 0d 09 |ewCell.v|++;..}..|
|00005910| 4c 44 6f 44 72 61 77 28 | 74 72 75 65 2c 6e 65 77 |LDoDraw(|true,new|
|00005920| 4c 69 73 74 29 3b 0d 09 | 0d 09 46 6f 72 63 65 55 |List);..|..ForceU|
|00005930| 70 64 61 74 65 28 29 3b | 0d 7d 0d 0d 0d 2f 2a 09 |pdate();|.}.../*.|
|00005940| 57 69 64 65 6e 53 65 61 | 72 63 68 20 69 73 20 63 |WidenSea|rch is c|
|00005950| 61 6c 6c 65 64 20 77 68 | 65 6e 20 74 68 65 20 62 |alled wh|en the b|
|00005960| 61 63 6b 73 70 61 63 65 | 20 6b 65 79 20 69 73 20 |ackspace| key is |
|00005970| 70 72 65 73 73 65 64 20 | 69 6e 0d 09 74 68 65 20 |pressed |in..the |
|00005980| 6e 61 72 72 6f 77 20 73 | 65 61 72 63 68 20 64 69 |narrow s|earch di|
|00005990| 61 6c 6f 67 20 62 6f 78 | 2e 20 20 49 74 20 72 65 |alog box|. It re|
|000059a0| 6d 6f 76 65 73 20 63 6f | 6e 73 74 72 61 69 6e 74 |moves co|nstraint|
|000059b0| 20 6f 6e 20 74 68 65 0d | 09 6c 69 73 74 20 61 6e | on the.|.list an|
|000059c0| 64 20 61 64 64 73 20 65 | 6e 74 72 69 65 73 20 77 |d adds e|ntries w|
|000059d0| 68 65 72 65 20 6e 65 63 | 65 73 73 61 72 79 0d 2a |here nec|essary.*|
|000059e0| 2f 0d 0d 76 6f 69 64 20 | 57 69 64 65 6e 53 65 61 |/..void |WidenSea|
|000059f0| 72 63 68 28 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 |rch(Twin|dowInfo |
|00005a00| 2a 69 6e 66 6f 29 0d 7b | 0d 09 43 65 6c 6c 20 74 |*info).{|..Cell t|
|00005a10| 68 65 43 65 6c 6c 2c 6e | 65 77 43 65 6c 6c 3b 0d |heCell,n|ewCell;.|
|00005a20| 09 63 68 61 72 20 63 65 | 6c 6c 44 61 74 61 5b 32 |.char ce|llData[2|
|00005a30| 35 36 5d 3b 0d 09 73 68 | 6f 72 74 20 64 61 74 61 |56];..sh|ort data|
|00005a40| 4c 65 6e 3b 0d 09 4c 69 | 73 74 48 61 6e 64 6c 65 |Len;..Li|stHandle|
|00005a50| 20 74 68 65 4c 69 73 74 | 3b 0d 09 0d 09 69 6e 66 | theList|;....inf|
|00005a60| 6f 2d 3e 66 69 6c 74 65 | 72 4c 65 6e 2d 2d 3b 0d |o->filte|rLen--;.|
|00005a70| 09 0d 09 69 66 20 28 69 | 6e 66 6f 2d 3e 66 69 6c |...if (i|nfo->fil|
|00005a80| 74 65 72 4c 65 6e 20 3d | 3d 20 30 29 0d 09 09 45 |terLen =|= 0)...E|
|00005a90| 6e 64 53 65 61 72 63 68 | 28 69 6e 66 6f 29 3b 0d |ndSearch|(info);.|
|00005aa0| 09 65 6c 73 65 20 7b 0d | 09 0d 09 09 2f 2a 20 72 |.else {.|..../* r|
|00005ab0| 65 62 75 69 6c 64 20 6c | 69 73 74 20 2a 2f 0d 09 |ebuild l|ist */..|
|00005ac0| 09 0d 09 09 74 68 65 4c | 69 73 74 20 3d 20 28 4c |....theL|ist = (L|
|00005ad0| 69 73 74 48 61 6e 64 6c | 65 29 20 69 6e 66 6f 2d |istHandl|e) info-|
|00005ae0| 3e 64 61 74 61 3b 0d 09 | 09 0d 09 09 4c 44 6f 44 |>data;..|....LDoD|
|00005af0| 72 61 77 28 66 61 6c 73 | 65 2c 74 68 65 4c 69 73 |raw(fals|e,theLis|
|00005b00| 74 29 3b 0d 09 09 4c 44 | 65 6c 52 6f 77 28 30 2c |t);...LD|elRow(0,|
|00005b10| 30 2c 74 68 65 4c 69 73 | 74 29 3b 0d 09 09 4c 41 |0,theLis|t);...LA|
|00005b20| 64 64 52 6f 77 28 31 2c | 30 2c 74 68 65 4c 69 73 |ddRow(1,|0,theLis|
|00005b30| 74 29 3b 0d 09 0d 09 09 | 53 65 74 50 74 28 26 74 |t);.....|SetPt(&t|
|00005b40| 68 65 43 65 6c 6c 2c 30 | 2c 30 29 3b 0d 09 09 53 |heCell,0|,0);...S|
|00005b50| 65 74 50 74 28 26 6e 65 | 77 43 65 6c 6c 2c 30 2c |etPt(&ne|wCell,0,|
|00005b60| 30 29 3b 0d 09 09 77 68 | 69 6c 65 20 28 50 74 49 |0);...wh|ile (PtI|
|00005b70| 6e 52 65 63 74 28 74 68 | 65 43 65 6c 6c 2c 26 28 |nRect(th|eCell,&(|
|00005b80| 2a 2a 28 69 6e 66 6f 2d | 3e 6e 61 72 72 6f 77 4c |**(info-|>narrowL|
|00005b90| 69 73 74 29 29 2e 64 61 | 74 61 42 6f 75 6e 64 73 |ist)).da|taBounds|
|00005ba0| 29 20 26 26 0d 09 09 09 | 09 4c 53 65 61 72 63 68 |) &&....|.LSearch|
|00005bb0| 28 69 6e 66 6f 2d 3e 66 | 69 6c 74 65 72 2c 69 6e |(info->f|ilter,in|
|00005bc0| 66 6f 2d 3e 66 69 6c 74 | 65 72 4c 65 6e 2c 4d 79 |fo->filt|erLen,My|
|00005bd0| 53 65 61 72 63 68 2c 26 | 74 68 65 43 65 6c 6c 2c |Search,&|theCell,|
|00005be0| 69 6e 66 6f 2d 3e 6e 61 | 72 72 6f 77 4c 69 73 74 |info->na|rrowList|
|00005bf0| 29 29 20 7b 0d 09 09 09 | 4c 41 64 64 52 6f 77 28 |)) {....|LAddRow(|
|00005c00| 31 2c 6e 65 77 43 65 6c | 6c 2e 76 2c 74 68 65 4c |1,newCel|l.v,theL|
|00005c10| 69 73 74 29 3b 0d 09 09 | 09 64 61 74 61 4c 65 6e |ist);...|.dataLen|
|00005c20| 20 3d 20 32 35 36 3b 0d | 09 09 09 4c 47 65 74 43 | = 256;.|...LGetC|
|00005c30| 65 6c 6c 28 63 65 6c 6c | 44 61 74 61 2c 26 64 61 |ell(cell|Data,&da|
|00005c40| 74 61 4c 65 6e 2c 74 68 | 65 43 65 6c 6c 2c 69 6e |taLen,th|eCell,in|
|00005c50| 66 6f 2d 3e 6e 61 72 72 | 6f 77 4c 69 73 74 29 3b |fo->narr|owList);|
|00005c60| 0d 09 09 09 4c 53 65 74 | 43 65 6c 6c 28 63 65 6c |....LSet|Cell(cel|
|00005c70| 6c 44 61 74 61 2c 64 61 | 74 61 4c 65 6e 2c 6e 65 |lData,da|taLen,ne|
|00005c80| 77 43 65 6c 6c 2c 74 68 | 65 4c 69 73 74 29 3b 0d |wCell,th|eList);.|
|00005c90| 09 09 09 74 68 65 43 65 | 6c 6c 2e 76 2b 2b 3b 0d |...theCe|ll.v++;.|
|00005ca0| 09 09 09 6e 65 77 43 65 | 6c 6c 2e 76 2b 2b 3b 0d |...newCe|ll.v++;.|
|00005cb0| 09 09 7d 0d 09 09 4c 44 | 6f 44 72 61 77 28 74 72 |..}...LD|oDraw(tr|
|00005cc0| 75 65 2c 74 68 65 4c 69 | 73 74 29 3b 0d 09 09 46 |ue,theLi|st);...F|
|00005cd0| 6f 72 63 65 55 70 64 61 | 74 65 28 29 3b 0d 09 7d |orceUpda|te();..}|
|00005ce0| 0d 7d 0d 0d 0d 2f 2a 09 | 4e 61 72 72 6f 77 53 65 |.}.../*.|NarrowSe|
|00005cf0| 61 72 63 68 20 69 73 20 | 63 61 6c 6c 65 64 20 62 |arch is |called b|
|00005d00| 79 20 74 68 65 20 6e 61 | 72 72 6f 77 69 6e 67 20 |y the na|rrowing |
|00005d10| 73 65 61 72 63 68 20 66 | 69 6c 74 65 72 20 77 68 |search f|ilter wh|
|00005d20| 65 6e 0d 09 61 20 6e 6f | 6e 2d 62 61 63 6b 73 70 |en..a no|n-backsp|
|00005d30| 61 63 65 20 6b 65 79 20 | 69 73 20 70 72 65 73 73 |ace key |is press|
|00005d40| 65 64 20 69 6e 20 74 68 | 65 20 64 69 61 6c 6f 67 |ed in th|e dialog|
|00005d50| 2e 20 20 49 74 20 73 65 | 61 72 63 68 65 73 0d 09 |. It se|arches..|
|00005d60| 74 68 65 20 73 65 63 6f | 6e 64 61 72 79 20 6c 69 |the seco|ndary li|
|00005d70| 73 74 20 66 6f 72 20 65 | 6e 74 72 69 65 73 20 77 |st for e|ntries w|
|00005d80| 68 69 63 68 20 6d 61 79 | 20 62 65 20 72 65 6d 6f |hich may| be remo|
|00005d90| 76 65 64 2e 0d 2a 2f 0d | 0d 76 6f 69 64 20 4e 61 |ved..*/.|.void Na|
|00005da0| 72 72 6f 77 53 65 61 72 | 63 68 28 54 77 69 6e 64 |rrowSear|ch(Twind|
|00005db0| 6f 77 49 6e 66 6f 20 2a | 69 6e 66 6f 2c 63 68 61 |owInfo *|info,cha|
|00005dc0| 72 20 74 68 65 43 68 61 | 72 29 0d 7b 0d 09 43 65 |r theCha|r).{..Ce|
|00005dd0| 6c 6c 20 74 68 65 43 65 | 6c 6c 3b 0d 09 63 68 61 |ll theCe|ll;..cha|
|00005de0| 72 20 64 61 74 61 5b 32 | 35 36 5d 3b 0d 09 73 68 |r data[2|56];..sh|
|00005df0| 6f 72 74 20 64 61 74 61 | 4c 65 6e 3b 0d 09 42 6f |ort data|Len;..Bo|
|00005e00| 6f 6c 65 61 6e 20 6e 6f | 74 44 6f 6e 65 20 3d 20 |olean no|tDone = |
|00005e10| 74 72 75 65 3b 0d 09 4c | 69 73 74 48 61 6e 64 6c |true;..L|istHandl|
|00005e20| 65 20 74 68 65 4c 69 73 | 74 3b 0d 09 0d 09 74 68 |e theLis|t;....th|
|00005e30| 65 4c 69 73 74 20 3d 20 | 28 4c 69 73 74 48 61 6e |eList = |(ListHan|
|00005e40| 64 6c 65 29 20 69 6e 66 | 6f 2d 3e 64 61 74 61 3b |dle) inf|o->data;|
|00005e50| 0d 09 0d 09 69 6e 66 6f | 2d 3e 66 69 6c 74 65 72 |....info|->filter|
|00005e60| 5b 69 6e 66 6f 2d 3e 66 | 69 6c 74 65 72 4c 65 6e |[info->f|ilterLen|
|00005e70| 2b 2b 5d 20 3d 20 74 68 | 65 43 68 61 72 3b 0d 09 |++] = th|eChar;..|
|00005e80| 0d 09 4c 44 6f 44 72 61 | 77 28 66 61 6c 73 65 2c |..LDoDra|w(false,|
|00005e90| 74 68 65 4c 69 73 74 29 | 3b 0d 09 53 65 74 50 74 |theList)|;..SetPt|
|00005ea0| 28 26 74 68 65 43 65 6c | 6c 2c 30 2c 30 29 3b 0d |(&theCel|l,0,0);.|
|00005eb0| 09 64 6f 20 7b 0d 09 09 | 64 61 74 61 4c 65 6e 20 |.do {...|dataLen |
|00005ec0| 3d 20 32 35 35 3b 0d 09 | 09 4c 47 65 74 43 65 6c |= 255;..|.LGetCel|
|00005ed0| 6c 28 64 61 74 61 2c 26 | 64 61 74 61 4c 65 6e 2c |l(data,&|dataLen,|
|00005ee0| 74 68 65 43 65 6c 6c 2c | 74 68 65 4c 69 73 74 29 |theCell,|theList)|
|00005ef0| 3b 0d 09 09 69 66 20 28 | 50 74 49 6e 52 65 63 74 |;...if (|PtInRect|
|00005f00| 28 74 68 65 43 65 6c 6c | 2c 26 28 2a 2a 74 68 65 |(theCell|,&(**the|
|00005f10| 4c 69 73 74 29 2e 64 61 | 74 61 42 6f 75 6e 64 73 |List).da|taBounds|
|00005f20| 29 20 26 26 0d 09 09 09 | 09 4d 79 53 65 61 72 63 |) &&....|.MySearc|
|00005f30| 68 28 64 61 74 61 2c 69 | 6e 66 6f 2d 3e 66 69 6c |h(data,i|nfo->fil|
|00005f40| 74 65 72 2c 64 61 74 61 | 4c 65 6e 2c 69 6e 66 6f |ter,data|Len,info|
|00005f50| 2d 3e 66 69 6c 74 65 72 | 4c 65 6e 29 20 21 3d 20 |->filter|Len) != |
|00005f60| 30 29 20 7b 0d 09 09 09 | 4c 44 65 6c 52 6f 77 28 |0) {....|LDelRow(|
|00005f70| 31 2c 74 68 65 43 65 6c | 6c 2e 76 2c 74 68 65 4c |1,theCel|l.v,theL|
|00005f80| 69 73 74 29 3b 0d 09 09 | 09 69 66 20 28 74 68 65 |ist);...|.if (the|
|00005f90| 43 65 6c 6c 2e 76 20 21 | 3d 20 30 29 0d 09 09 09 |Cell.v !|= 0)....|
|00005fa0| 09 74 68 65 43 65 6c 6c | 2e 76 2d 2d 3b 0d 09 09 |.theCell|.v--;...|
|00005fb0| 7d 0d 09 09 65 6c 73 65 | 20 6e 6f 74 44 6f 6e 65 |}...else| notDone|
|00005fc0| 20 3d 20 4c 4e 65 78 74 | 43 65 6c 6c 28 66 61 6c | = LNext|Cell(fal|
|00005fd0| 73 65 2c 74 72 75 65 2c | 26 74 68 65 43 65 6c 6c |se,true,|&theCell|
|00005fe0| 2c 74 68 65 4c 69 73 74 | 29 3b 0d 09 7d 20 77 68 |,theList|);..} wh|
|00005ff0| 69 6c 65 20 28 6e 6f 74 | 44 6f 6e 65 29 3b 0d 09 |ile (not|Done);..|
|00006000| 4c 44 6f 44 72 61 77 28 | 74 72 75 65 2c 74 68 65 |LDoDraw(|true,the|
|00006010| 4c 69 73 74 29 3b 0d 09 | 46 6f 72 63 65 55 70 64 |List);..|ForceUpd|
|00006020| 61 74 65 28 29 3b 0d 7d | 0d 0d 0d 2f 2a 09 45 6e |ate();.}|.../*.En|
|00006030| 64 53 65 61 72 63 68 20 | 69 73 20 63 61 6c 6c 65 |dSearch |is calle|
|00006040| 64 20 77 68 65 6e 20 61 | 20 6e 61 72 72 6f 77 69 |d when a| narrowi|
|00006050| 6e 67 20 73 65 61 72 63 | 68 20 68 61 73 20 62 65 |ng searc|h has be|
|00006060| 65 6e 20 63 6f 6d 70 6c | 65 74 65 64 2e 0d 2a 2f |en compl|eted..*/|
|00006070| 0d 76 6f 69 64 20 45 6e | 64 53 65 61 72 63 68 28 |.void En|dSearch(|
|00006080| 54 77 69 6e 64 6f 77 49 | 6e 66 6f 20 2a 69 6e 66 |TwindowI|nfo *inf|
|00006090| 6f 29 0d 7b 0d 09 4c 69 | 73 74 48 61 6e 64 6c 65 |o).{..Li|stHandle|
|000060a0| 20 64 6f 6e 65 4c 69 73 | 74 3b 0d 09 57 69 6e 64 | doneLis|t;..Wind|
|000060b0| 6f 77 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |owPtr th|eWindow;|
|000060c0| 0d 09 47 72 61 66 50 74 | 72 20 73 61 76 65 50 6f |..GrafPt|r savePo|
|000060d0| 72 74 3b 0d 09 0d 09 74 | 68 65 57 69 6e 64 6f 77 |rt;....t|heWindow|
|000060e0| 20 3d 20 28 57 69 6e 64 | 6f 77 50 74 72 29 28 28 | = (Wind|owPtr)((|
|000060f0| 57 69 6e 64 6f 77 50 65 | 65 6b 29 46 72 6f 6e 74 |WindowPe|ek)Front|
|00006100| 57 69 6e 64 6f 77 28 29 | 29 2d 3e 6e 65 78 74 57 |Window()|)->nextW|
|00006110| 69 6e 64 6f 77 3b 0d 0d | 09 64 6f 6e 65 4c 69 73 |indow;..|.doneLis|
|00006120| 74 20 3d 20 28 4c 69 73 | 74 48 61 6e 64 6c 65 29 |t = (Lis|tHandle)|
|00006130| 20 69 6e 66 6f 2d 3e 64 | 61 74 61 3b 0d 09 4c 41 | info->d|ata;..LA|
|00006140| 63 74 69 76 61 74 65 28 | 74 72 75 65 2c 69 6e 66 |ctivate(|true,inf|
|00006150| 6f 2d 3e 6e 61 72 72 6f | 77 4c 69 73 74 29 3b 0d |o->narro|wList);.|
|00006160| 09 4c 44 69 73 70 6f 73 | 65 28 64 6f 6e 65 4c 69 |.LDispos|e(doneLi|
|00006170| 73 74 29 3b 0d 09 69 6e | 66 6f 2d 3e 64 61 74 61 |st);..in|fo->data|
|00006180| 20 3d 20 28 48 61 6e 64 | 6c 65 29 20 69 6e 66 6f | = (Hand|le) info|
|00006190| 2d 3e 6e 61 72 72 6f 77 | 4c 69 73 74 3b 0d 09 69 |->narrow|List;..i|
|000061a0| 6e 66 6f 2d 3e 6e 61 72 | 72 6f 77 4c 69 73 74 20 |nfo->nar|rowList |
|000061b0| 3d 20 6e 69 6c 3b 0d 09 | 69 6e 66 6f 2d 3e 66 69 |= nil;..|info->fi|
|000061c0| 6c 74 65 72 5b 30 5d 20 | 3d 20 27 5c 30 27 3b 0d |lter[0] |= '\0';.|
|000061d0| 09 69 6e 66 6f 2d 3e 66 | 69 6c 74 65 72 4c 65 6e |.info->f|ilterLen|
|000061e0| 20 3d 20 30 3b 0d 09 47 | 65 74 50 6f 72 74 28 26 | = 0;..G|etPort(&|
|000061f0| 73 61 76 65 50 6f 72 74 | 29 3b 0d 09 53 65 74 50 |savePort|);..SetP|
|00006200| 6f 72 74 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |ort(theW|indow);.|
|00006210| 09 53 69 7a 65 43 6f 6e | 74 65 6e 74 73 28 74 68 |.SizeCon|tents(th|
|00006220| 65 57 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |eWindow-|>portRec|
|00006230| 74 2e 72 69 67 68 74 2d | 74 68 65 57 69 6e 64 6f |t.right-|theWindo|
|00006240| 77 2d 3e 70 6f 72 74 52 | 65 63 74 2e 6c 65 66 74 |w->portR|ect.left|
|00006250| 2c 74 68 65 57 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 |,theWind|ow->port|
|00006260| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 2d 74 68 65 57 |Rect.bot|tom-theW|
|00006270| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 2e |indow->p|ortRect.|
|00006280| 74 6f 70 2c 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |top,theW|indow);.|
|00006290| 09 53 65 74 50 6f 72 74 | 28 73 61 76 65 50 6f 72 |.SetPort|(savePor|
|000062a0| 74 29 3b 0d 09 46 6f 72 | 63 65 55 70 64 61 74 65 |t);..For|ceUpdate|
|000062b0| 28 29 3b 0d 7d 0d 0d 0d | 2f 2a 09 46 6f 72 63 65 |();.}...|/*.Force|
|000062c0| 55 70 64 61 74 65 20 69 | 73 20 63 61 6c 6c 65 64 |Update i|s called|
|000062d0| 20 62 79 20 74 68 65 20 | 6e 61 72 72 6f 77 69 6e | by the |narrowin|
|000062e0| 67 20 73 65 61 72 63 68 | 20 72 6f 75 74 69 6e 65 |g search| routine|
|000062f0| 73 20 74 6f 0d 09 69 6e | 76 61 6c 69 64 61 74 65 |s to..in|validate|
|00006300| 20 74 68 65 20 6c 69 73 | 74 20 61 72 65 61 2c 20 | the lis|t area, |
|00006310| 66 6f 72 63 69 6e 67 20 | 61 6e 20 75 70 64 61 74 |forcing |an updat|
|00006320| 65 20 65 76 65 6e 74 20 | 74 6f 20 62 65 0d 09 67 |e event |to be..g|
|00006330| 65 6e 65 72 61 74 65 64 | 20 66 6f 72 20 74 68 65 |enerated| for the|
|00006340| 20 61 72 65 61 2e 0d 2a | 2f 0d 0d 76 6f 69 64 20 | area..*|/..void |
|00006350| 46 6f 72 63 65 55 70 64 | 61 74 65 28 76 6f 69 64 |ForceUpd|ate(void|
|00006360| 29 0d 7b 0d 09 57 69 6e | 64 6f 77 50 74 72 20 74 |).{..Win|dowPtr t|
|00006370| 68 65 57 69 6e 64 6f 77 | 3b 0d 09 47 72 61 66 50 |heWindow|;..GrafP|
|00006380| 74 72 20 73 61 76 65 50 | 6f 72 74 3b 0d 0d 09 74 |tr saveP|ort;...t|
|00006390| 68 65 57 69 6e 64 6f 77 | 20 3d 20 28 57 69 6e 64 |heWindow| = (Wind|
|000063a0| 6f 77 50 74 72 29 28 28 | 57 69 6e 64 6f 77 50 65 |owPtr)((|WindowPe|
|000063b0| 65 6b 29 46 72 6f 6e 74 | 57 69 6e 64 6f 77 28 29 |ek)Front|Window()|
|000063c0| 29 2d 3e 6e 65 78 74 57 | 69 6e 64 6f 77 3b 0d 0d |)->nextW|indow;..|
|000063d0| 09 47 65 74 50 6f 72 74 | 28 26 73 61 76 65 50 6f |.GetPort|(&savePo|
|000063e0| 72 74 29 3b 0d 09 53 65 | 74 50 6f 72 74 28 74 68 |rt);..Se|tPort(th|
|000063f0| 65 57 69 6e 64 6f 77 29 | 3b 0d 09 49 6e 76 61 6c |eWindow)|;..Inval|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.